Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ewm 426 ton confirm transaction bloc elementary #768

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/app/router/routs/wallet/wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import 'package:app/feature/wallet/new_account/add_account.dart';
import 'package:app/feature/wallet/new_account/add_account_page.dart';
import 'package:app/feature/wallet/new_account/add_external_account/add_external_account_page.dart';
import 'package:app/feature/wallet/new_account/select_seed/select_seed_page.dart';
import 'package:app/feature/wallet/ton_confirm_transaction/ton_confirm_transaction_screen.dart';
import 'package:app/feature/wallet/wallet.dart';
import 'package:app/feature/wallet/widgets/account_asset_tab/select_new_asset/select_new_asset.dart';
import 'package:app/utils/url_utils.dart';
Expand Down Expand Up @@ -348,7 +349,7 @@ GoRoute get tonConfirmTranscationRoute {
) as List<dynamic>)
.cast<String>();

return TonConfirmTransactionPage(
return TonConfirmTransactionScreen(
walletAddress: Address(
address: state.uri.queryParameters[
tonWalletConfirmTransactionWalletAddressQueryParam]!,
Expand Down
1 change: 0 additions & 1 deletion lib/feature/wallet/ton_confirm_transaction/bloc/bloc.dart

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
part of 'ton_confirm_transaction_bloc.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:nekoton_repository/nekoton_repository.dart';

part 'ton_confirm_transaction_state.freezed.dart';

@freezed
class TonConfirmTransactionState with _$TonConfirmTransactionState {
const factory TonConfirmTransactionState.prepare() = _PrepareState;
const factory TonConfirmTransactionState.prepare() = PrepareState;

const factory TonConfirmTransactionState.loading(
PublicKey custodian,
) = _LoadingState;
) = LoadingState;

const factory TonConfirmTransactionState.subscribeError(Object error) =
_SubscribeError;
SubscribeError;

/// Error during prepare process
const factory TonConfirmTransactionState.calculatingError(
String error,
PublicKey custodian, [
BigInt? fee,
]) = _CalculatingError;
]) = CalculatingError;

/// Blockchain fee loaded, allow user send transaction
const factory TonConfirmTransactionState.readyToSend(
BigInt fee,
PublicKey custodian,
) = _Ready;
) = Ready;

/// Transaction is sending.
/// [canClose] needs to allow user close transaction right after it was sent
/// to blockchain but not completed.
const factory TonConfirmTransactionState.sending({required bool canClose}) =
_Sending;
Sending;

/// Transaction sent successfully
const factory TonConfirmTransactionState.sent(
BigInt fee,
Transaction transaction,
PublicKey custodian,
) = _Sent;
) = Sent;
}
Loading
Loading