File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change 20
20
const extraMana: number = getExtraMana (NUMBER_OF_EXTRA_SLOTS_MANA )
21
21
22
22
let requiredTxManaCost: number = 0
23
- let secondsRemaining: number = 0
24
23
let countdownInterval: NodeJS .Timeout
25
24
let secondsToRefreshManaCost = NUMBER_OF_EXTRA_SLOTS_MANA * DEFAULT_SECONDS_PER_SLOT
26
25
36
35
transactionInfo .preparedTransactionError .message ?.includes (' slots remaining until enough mana' )
37
36
) {
38
37
const splittedError = transactionInfo .preparedTransactionError .message ?.split (' ' )
39
-
40
38
const requiredManaForTransaction = splittedError [splittedError .indexOf (' required' ) + 1 ]?.replace (' ,' , ' ' )
41
39
requiredTxManaCost = Number (requiredManaForTransaction ?? 0 )
42
-
43
- const slotsRemaining = Number (splittedError .reverse ()[0 ].replace (' `' , ' ' ))
44
- secondsRemaining = slotsRemaining * DEFAULT_SECONDS_PER_SLOT
45
40
} else if (transactionInfo ?.preparedTransaction ) {
46
41
requiredTxManaCost =
47
42
transactionInfo .preparedTransaction ._preparedData ?.transaction ?.allotments ?.reduce (
77
72
<Text type ={TextType .p } error classes =" text-center" >
78
73
{localize (' general.insufficientMana' , {
79
74
values: {
80
- availableMana ,
81
- secondsRemaining ,
75
+ availableMana: formatTokenAmountBestMatch (availableMana , mana .metadata ),
82
76
},
83
77
})}
84
78
</Text >
85
- {/if }
86
- {#if showCountdown }
79
+ {:else if showCountdown }
87
80
<Text type ={TextType .p } classes =" text-center" >
88
81
{localize (' general.secondsToRefreshManaCost' , {
89
82
values: {
Original file line number Diff line number Diff line change 1719
1719
"verifyLedgerDepositAddress" : " Please check the ledger device and verify that the deposit address matches the one displayed on the ledger device" ,
1720
1720
"manaCost" : " Estimated Mana cost" ,
1721
1721
"availableMana" : " Available mana" ,
1722
- "insufficientMana" : " Insufficient mana {availableMana}, wait {secondsRemaining} seconds ." ,
1722
+ "insufficientMana" : " Insufficient {availableMana}." ,
1723
1723
"secondsToRefreshManaCost" : " {seconds} seconds to refresh the mana cost"
1724
1724
},
1725
1725
"filters" :{
You can’t perform that action at this time.
0 commit comments