File tree 2 files changed +11
-10
lines changed
2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 69
69
hasPrice = true
70
70
} catch (err ) {
71
71
console .error (err )
72
- notifyError (err , $t (' swap.error- price' ))
72
+ notifyError (err , $t (' swap.error. price' ))
73
73
} finally {
74
74
gettingPrice = false
75
75
}
133
133
134
134
const explorer = $network .blockExplorers ?.default .url
135
135
const txUrl = ` ${explorer }/tx/${swapTxHash } `
136
- successToast ($t (' swap.trading. ongoing' , { values: { txUrl } }))
136
+ successToast ($t (' swap.ongoing' , { values: { txUrl } }))
137
137
138
138
// Step 4: Let's wait for the transaction to be mined,
139
139
// and find out if it was successful or not
142
142
console .log (' Swap tx receipt:' , receipt )
143
143
144
144
if (receipt .status === ' reverted' ) {
145
- errorToast ($t (' swap.trading. reverted' , { values: { txUrl } }))
145
+ errorToast ($t (' swap.reverted' , { values: { txUrl } }))
146
146
}
147
147
} catch (err ) {
148
148
console .error (err )
149
- notifyError (err , $t (' swap.trading. error' ))
149
+ notifyError (err , $t (' swap.error.trading ' ))
150
150
} finally {
151
151
trading = false
152
152
}
191
191
</div >
192
192
<button disabled ={! canTrade } class ="btn btn-primary btn-md w-full relative md:btn-lg" on:click ={trade }>
193
193
{#if trading }
194
- <Loading text =" Trading… " size =" sm" layout =" row" />
194
+ <Loading text ={ $t ( ' swap.trading ' )} size =" sm" layout =" row" />
195
195
{:else }
196
196
{$t (' swap.trade' )}
197
197
{/if }
Original file line number Diff line number Diff line change 4
4
"subtitle" : " Trade tokens in an instant" ,
5
5
"estimate-gas" : " Estimated Gas" ,
6
6
"trade" : " Trade" ,
7
- "error-price" : " There was an error fetching the price" ,
8
- "trading" : {
9
- "error" : " There was an error trading the tokens" ,
10
- "ongoing" : " Trade is on the way. Click <a href=\" {txUrl}\" ><i>here</i></a> to view the state of the transaction" ,
11
- "reverted" : " The trade was reverted. Click <a href=\" {txUrl}\" ><i>here</i></a> to view the failed transaction"
7
+ "trading" : " Trading…" ,
8
+ "ongoing" : " Trade is on the way. Click <a href=\" {txUrl}\" ><i>here</i></a> to view the state of the transaction" ,
9
+ "reverted" : " The trade was reverted. Click <a href=\" {txUrl}\" ><i>here</i></a> to view the failed transaction" ,
10
+ "error" : {
11
+ "price" : " There was an error fetching the price" ,
12
+ "trading" : " There was an error trading the tokens"
12
13
}
13
14
},
14
15
"token-amount" : {
You can’t perform that action at this time.
0 commit comments