Skip to content

Commit d9a37b5

Browse files
committed
Minor change
1 parent f84b6de commit d9a37b5

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/components/Swap/Swap.svelte

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
hasPrice = true
7070
} catch (err) {
7171
console.error(err)
72-
notifyError(err, $t('swap.error-price'))
72+
notifyError(err, $t('swap.error.price'))
7373
} finally {
7474
gettingPrice = false
7575
}
@@ -133,7 +133,7 @@
133133
134134
const explorer = $network.blockExplorers?.default.url
135135
const txUrl = `${explorer}/tx/${swapTxHash}`
136-
successToast($t('swap.trading.ongoing', { values: { txUrl } }))
136+
successToast($t('swap.ongoing', { values: { txUrl } }))
137137
138138
// Step 4: Let's wait for the transaction to be mined,
139139
// and find out if it was successful or not
@@ -142,11 +142,11 @@
142142
console.log('Swap tx receipt:', receipt)
143143
144144
if (receipt.status === 'reverted') {
145-
errorToast($t('swap.trading.reverted', { values: { txUrl } }))
145+
errorToast($t('swap.reverted', { values: { txUrl } }))
146146
}
147147
} catch (err) {
148148
console.error(err)
149-
notifyError(err, $t('swap.trading.error'))
149+
notifyError(err, $t('swap.error.trading'))
150150
} finally {
151151
trading = false
152152
}
@@ -191,7 +191,7 @@
191191
</div>
192192
<button disabled={!canTrade} class="btn btn-primary btn-md w-full relative md:btn-lg" on:click={trade}>
193193
{#if trading}
194-
<Loading text="Trading…" size="sm" layout="row" />
194+
<Loading text={$t('swap.trading')} size="sm" layout="row" />
195195
{:else}
196196
{$t('swap.trade')}
197197
{/if}

src/i18n/en.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
"subtitle": "Trade tokens in an instant",
55
"estimate-gas": "Estimated Gas",
66
"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"
1213
}
1314
},
1415
"token-amount": {

0 commit comments

Comments
 (0)