mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
v6.4.4 Release Candidate (#3594)
- Monero sync patches - Trezor bitcoin - Solana NFTs sending - Bug fixes
This commit is contained in:
@@ -641,6 +641,13 @@ Future<void> defaultSettingsMigration(
|
||||
case 70:
|
||||
await _addTbbTokenToExistingSolanaWallets();
|
||||
break;
|
||||
case 71:
|
||||
_changeExchangeProviderAvailability(
|
||||
sharedPreferences,
|
||||
providerName: "Swaps.XYZ",
|
||||
enabled: false,
|
||||
);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -308,7 +308,7 @@ Future<void> initializeAppConfigs({bool loadWallet = true}) async {
|
||||
payjoinSessionSource: payjoinSessionSource,
|
||||
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
||||
havenSeedStore: havenSeedStore,
|
||||
initialMigrationVersion: 70,
|
||||
initialMigrationVersion: 71,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ class _NFTSendPage extends BasePage {
|
||||
}
|
||||
|
||||
Future<void> _onSendPressed(BuildContext context) async {
|
||||
if (nftSendViewModel.state is IsExecutingState) {
|
||||
if (nftSendViewModel.isStartingSend || nftSendViewModel.state is IsExecutingState) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -163,18 +163,23 @@ class _NFTSendPage extends BasePage {
|
||||
|
||||
final destinationAddress = addressController.text.trim();
|
||||
|
||||
await authService.authenticateAction(
|
||||
context,
|
||||
conditionToDetermineIfToUse2FA: nftSendViewModel.shouldRequireTOTP2FAFor(destinationAddress),
|
||||
onAuthSuccess: (isAuthenticatedSuccessfully) async {
|
||||
if (!isAuthenticatedSuccessfully || !context.mounted) {
|
||||
nftSendViewModel.reset();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await authService.authenticateAction(
|
||||
context,
|
||||
conditionToDetermineIfToUse2FA:
|
||||
nftSendViewModel.shouldRequireTOTP2FAFor(destinationAddress),
|
||||
onAuthSuccess: (isAuthenticatedSuccessfully) async {
|
||||
if (!isAuthenticatedSuccessfully || !context.mounted) {
|
||||
nftSendViewModel.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
await _createAndConfirm(context, destinationAddress);
|
||||
},
|
||||
);
|
||||
await _createAndConfirm(context, destinationAddress);
|
||||
},
|
||||
);
|
||||
} finally {
|
||||
nftSendViewModel.markSendSettled();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _createAndConfirm(BuildContext context, String destinationAddress) async {
|
||||
|
||||
@@ -90,11 +90,25 @@ abstract class NFTSendViewModelBase with Store {
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
void markSendStarted() => state = IsExecutingState();
|
||||
/// Re-entrancy latch for the send button, held only while the tap handler is
|
||||
/// inside [AuthService.authenticateAction].
|
||||
///
|
||||
/// Deliberately not [state]: the auth sheet is pushed closable, and closing it
|
||||
/// pops the route without ever invoking onAuthenticationFinished, so a flag
|
||||
/// that waits on the auth result would never be cleared. The caller clears
|
||||
/// this in a finally instead. Once auth succeeds, createTransaction takes over
|
||||
/// the guard by setting IsExecutingState synchronously.
|
||||
bool _isStartingSend = false;
|
||||
|
||||
bool get isStartingSend => _isStartingSend;
|
||||
|
||||
void markSendStarted() => _isStartingSend = true;
|
||||
|
||||
void markSendSettled() => _isStartingSend = false;
|
||||
|
||||
@action
|
||||
void reset() {
|
||||
_isStartingSend = false;
|
||||
pendingTransaction = null;
|
||||
state = InitialExecutionState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user