From 9ebcae82c027b341e3c9ec5babb19f6c20906fdf Mon Sep 17 00:00:00 2001 From: alienc0der <118136375+alienc0der@users.noreply.github.com> Date: Tue, 20 Jun 2023 18:10:27 +0300 Subject: [PATCH] refactor: renamed votePillar to delegateToPillar --- lib/blocs/pillars/delegate_button_bloc.dart | 4 +--- .../modular_widgets/pillars_widgets/pillars_list_widget.dart | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/blocs/pillars/delegate_button_bloc.dart b/lib/blocs/pillars/delegate_button_bloc.dart index 63145e32..bb65b1d5 100644 --- a/lib/blocs/pillars/delegate_button_bloc.dart +++ b/lib/blocs/pillars/delegate_button_bloc.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:zenon_syrius_wallet_flutter/blocs/blocs.dart'; import 'package:zenon_syrius_wallet_flutter/main.dart'; import 'package:zenon_syrius_wallet_flutter/utils/account_block_utils.dart'; @@ -6,9 +5,8 @@ import 'package:zenon_syrius_wallet_flutter/utils/constants.dart'; import 'package:znn_sdk_dart/znn_sdk_dart.dart'; class DelegateButtonBloc extends BaseBloc { - Future votePillar( + Future delegateToPillar( String? pillarName, - BuildContext context, ) async { try { addEvent(null); diff --git a/lib/widgets/modular_widgets/pillars_widgets/pillars_list_widget.dart b/lib/widgets/modular_widgets/pillars_widgets/pillars_list_widget.dart index eb39bfb8..c8ef208f 100644 --- a/lib/widgets/modular_widgets/pillars_widgets/pillars_list_widget.dart +++ b/lib/widgets/modular_widgets/pillars_widgets/pillars_list_widget.dart @@ -368,7 +368,7 @@ class _PillarsListWidgetState extends State { setState(() { _currentlyDelegatingToPillar = pillarInfo.name; }); - model.votePillar(pillarInfo.name, context); + model.delegateToPillar(pillarInfo.name); }, text: 'DELEGATE', textStyle: Theme.of(context).textTheme.titleSmall!.copyWith(