diff --git a/src/pages/Swap.vue b/src/pages/Swap.vue
index 2ff7aeb..151a245 100644
--- a/src/pages/Swap.vue
+++ b/src/pages/Swap.vue
@@ -196,7 +196,17 @@
/>
{{ $t("swap.execute_button_deflex") }}
-
+
Quote:
+
+ {{
+ this.$filters.formatCurrency(
+ Number(this.deflexQuotes.quote),
+ "",
+ this.toAssetDecimals
+ )
+ }}
+
+ Price:
{{
this.$filters.formatCurrency(
@@ -208,6 +218,19 @@
)
}}
+
+ {{
+ this.$filters.formatCurrency(
+ 10 ** 6 /
+ ((10 ** 6 * Number(this.deflexQuotes.quote)) /
+ 10 ** this.toAssetDecimals /
+ this.payamount /
+ 10 ** 6),
+ this.pairReversed,
+ 6
+ )
+ }}
+
+ Quote:
+
+ {{
+ this.$filters.formatCurrency(
+ Number(this.folksQuote.quoteAmount),
+ "",
+ this.toAssetDecimals
+ )
+ }}
+
+ Price:
{{
this.$filters.formatCurrency(
@@ -242,6 +276,19 @@
)
}}
+
+ {{
+ this.$filters.formatCurrency(
+ 10 ** 6 /
+ ((10 ** 6 * Number(this.folksQuote.quoteAmount)) /
+ 10 ** this.toAssetDecimals /
+ this.payamount /
+ 10 ** 6),
+ this.pairReversed,
+ 6
+ )
+ }}
+
@@ -403,6 +450,9 @@ export default {
pair() {
return `${this.fromAssetUnit}/${this.toAssetUnit}`;
},
+ pairReversed() {
+ return `${this.toAssetUnit}/${this.fromAssetUnit}`;
+ },
isFolksQuoteBetter() {
if (!this.folksQuote) {
return false;
@@ -459,6 +509,7 @@ export default {
};
}
this.payamount = 0;
+ localStorage.setItem("last-swap-from-asset", this.asset);
},
async toAsset() {
this.deflexTxs = { groupMetadata: [] };
@@ -475,6 +526,7 @@ export default {
decimals: 6,
};
}
+ localStorage.setItem("last-swap-to-asset", this.toAsset);
},
account() {
this.deflexTxs = { groupMetadata: [] };
@@ -501,9 +553,19 @@ export default {
this.payamount = 1;
if (this.$route.params.fromAsset) {
this.asset = this.$route.params.fromAsset;
+ } else {
+ const asset = localStorage.getItem("last-swap-from-asset");
+ if (asset) {
+ this.asset = Number(asset);
+ }
}
if (this.$route.params.toAsset) {
this.toAsset = this.$route.params.toAsset;
+ } else {
+ const asset = localStorage.getItem("last-swap-to-asset");
+ if (asset) {
+ this.toAsset = Number(asset);
+ }
}
},
methods: {