Skip to content

Commit fcf3061

Browse files
enhancement: dont allow sending while preparing the output for the transaction (#7771)
* enhancement: dont allow sending while preparing the output for the transaction * improvement: use fixed locale to improve ui
1 parent 5420e6f commit fcf3061

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/desktop/components/popups/send/SendConfirmationPopup.svelte

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
let minimumStorageDeposit = 0
6060
let visibleSurplus: number | undefined = undefined
6161
62+
let isPreparingOutput = false
63+
6264
$: expirationTimePicker?.setNull(giftStorageDeposit)
6365
6466
$: isBaseTokenTransfer =
@@ -101,6 +103,8 @@
101103
})
102104
103105
async function rebuildTransactionOutput(): Promise<void> {
106+
isPreparingOutput = true
107+
104108
updateNewTransactionDetails({
105109
type: transactionType,
106110
expirationDate,
@@ -126,6 +130,8 @@
126130
}
127131
} catch (err) {
128132
handleError(err)
133+
} finally {
134+
isPreparingOutput = false
129135
}
130136
}
131137
@@ -261,9 +267,12 @@
261267
classes="w-full"
262268
onClick={onConfirmClick}
263269
disabled={isTransferring ||
270+
isPreparingOutput ||
264271
(layer2Parameters?.networkAddress && !$newTransactionDetails?.layer2Parameters?.gasBudget)}
265272
isBusy={isTransferring ||
273+
isPreparingOutput ||
266274
(layer2Parameters?.networkAddress && !$newTransactionDetails?.layer2Parameters?.gasBudget)}
275+
busyMessage={isPreparingOutput ? 'Preparing' : ''}
267276
>
268277
{localize('actions.send')}
269278
</Button>

0 commit comments

Comments
 (0)