diff --git a/package.json b/package.json
index 071ee4262..affe77595 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
},
"dependencies": {
"@metamask/detect-provider": "^1.2.0",
- "@soramitsu/soraneo-wallet-web": "1.6.37",
+ "@soramitsu/soraneo-wallet-web": "1.6.41",
"@walletconnect/web3-provider": "^1.6.6",
"core-js": "^3.6.4",
"ethers": "^5.3.1",
diff --git a/src/components/App/Header/AppHeader.vue b/src/components/App/Header/AppHeader.vue
index eca63c8fc..a3c70cd2f 100644
--- a/src/components/App/Header/AppHeader.vue
+++ b/src/components/App/Header/AppHeader.vue
@@ -16,8 +16,8 @@
@@ -167,8 +167,22 @@ export default class AmountTable extends Mixins(mixins.FormattedAmountMixin, Tra
&__input {
& .el-checkbox__inner {
border-radius: 6px !important;
+
&:after {
- left: 4px;
+ content: '\ea1c';
+ color: white;
+ font-family: 'soramitsu-icons';
+ border: none;
+ transform: rotate(0) scaleY(0);
+ left: 2px;
+ top: 2px;
+ }
+ }
+ &.is-checked {
+ & .el-checkbox__inner {
+ &:after {
+ transform: rotate(0) scaleY(1);
+ }
}
}
&:not(.is-checked) {
@@ -208,11 +222,18 @@ export default class AmountTable extends Mixins(mixins.FormattedAmountMixin, Tra
}
}
- &-tooltip.el-tooltip__popper.neumorphic {
+ &-tooltip.el-popover.el-popper {
+ border-color: var(--s-color-base-border-secondary);
+ border-radius: var(--s-border-radius-mini);
+ box-shadow: var(--s-shadow-dialog);
background-color: var(--s-color-status-success);
+ padding: $inner-spacing-mini $inner-spacing-small;
&[x-placement^='right'] .popper__arrow {
- border-right-color: var(--s-color-status-success);
+ border-right-color: var(--s-color-base-border-secondary);
+ &:after {
+ border-right-color: var(--s-color-status-success);
+ }
}
}
diff --git a/src/components/mixins/NetworkFeeDialogMixin.ts b/src/components/mixins/NetworkFeeDialogMixin.ts
index 63a65a309..8af7aaea4 100644
--- a/src/components/mixins/NetworkFeeDialogMixin.ts
+++ b/src/components/mixins/NetworkFeeDialogMixin.ts
@@ -4,6 +4,11 @@ import { delay } from '@/utils';
@Component
export default class NetworkFeeDialogMixin extends Vue {
showWarningFeeDialog = false;
+ isWarningFeeDialogConfirmed = false;
+
+ confirmNetworkFeeWariningDialog(): void {
+ this.isWarningFeeDialogConfirmed = true;
+ }
openWarningFeeDialog(): void {
this.showWarningFeeDialog = true;
diff --git a/src/components/mixins/TokenPairMixin.ts b/src/components/mixins/TokenPairMixin.ts
index df13e93f6..9c273bbb8 100644
--- a/src/components/mixins/TokenPairMixin.ts
+++ b/src/components/mixins/TokenPairMixin.ts
@@ -13,6 +13,7 @@ import {
isXorAccountAsset,
hasInsufficientBalance,
formatAssetBalance,
+ getAssetBalance,
} from '@/utils';
const CreateTokenPairMixin = (namespace: string) => {
@@ -168,7 +169,11 @@ const CreateTokenPairMixin = (namespace: string) => {
});
}
- getTokenBalance(token: any): string {
+ getTokenBalance(token: any): CodecString {
+ return getAssetBalance(token);
+ }
+
+ getFormattedTokenBalance(token: any): string {
return formatAssetBalance(token);
}
diff --git a/src/lang/cs.json b/src/lang/cs.json
index c54202d82..793c53faa 100644
--- a/src/lang/cs.json
+++ b/src/lang/cs.json
@@ -127,7 +127,8 @@
"reserved": " - Rezervováno",
"total": "Celkem"
},
- "totalAssetsValue": "Celková hodnota vašich aktiv:"
+ "totalAssetsValue": "Celková hodnota vašich aktiv:",
+ "details": "Podrobnosti"
},
"asset": {
"remove": "Odebrat aktivum"
diff --git a/src/lang/de.json b/src/lang/de.json
index e2f0e571d..3e09c0dd5 100644
--- a/src/lang/de.json
+++ b/src/lang/de.json
@@ -127,7 +127,8 @@
"reserved": " Reserviert",
"total": "Gesamt"
},
- "totalAssetsValue": "Gesamtwert deiner Assets:"
+ "totalAssetsValue": "Gesamtwert deiner Assets:",
+ "details": "Einzelheiten"
},
"asset": {
"remove": "Asset entfernen"
diff --git a/src/lang/en.json b/src/lang/en.json
index 7a85f08ca..40cd0fd0f 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -127,7 +127,8 @@
"reserved": " - Reserved",
"total": "Total"
},
- "totalAssetsValue": "Your total assets value:"
+ "totalAssetsValue": "Your total assets value:",
+ "details": "Details"
},
"asset": {
"remove": "Remove asset"
diff --git a/src/lang/es.json b/src/lang/es.json
index 440784b12..7cc317782 100644
--- a/src/lang/es.json
+++ b/src/lang/es.json
@@ -127,7 +127,8 @@
"reserved": "- Reservado",
"total": "Total"
},
- "totalAssetsValue": "El valor total de sus activos:"
+ "totalAssetsValue": "El valor total de sus activos:",
+ "details": "Detalles"
},
"asset": {
"remove": "Eliminar el Activo"
diff --git a/src/lang/fr.json b/src/lang/fr.json
index 7edd855db..23ff6bfe0 100644
--- a/src/lang/fr.json
+++ b/src/lang/fr.json
@@ -127,7 +127,8 @@
"reserved": "- Réservé",
"total": "Total"
},
- "totalAssetsValue": "Valeur total de vos actifs:"
+ "totalAssetsValue": "Valeur total de vos actifs:",
+ "details": "Détails"
},
"asset": {
"remove": "Retirer l'actif"
diff --git a/src/lang/hy.json b/src/lang/hy.json
index f4263729d..a72cc9da1 100644
--- a/src/lang/hy.json
+++ b/src/lang/hy.json
@@ -127,7 +127,8 @@
"reserved": "- վերապահված է",
"total": "Ընդհանուր"
},
- "totalAssetsValue": "Ձեր ակտիվների ընդհանուր արժեքը."
+ "totalAssetsValue": "Ձեր ակտիվների ընդհանուր արժեքը.",
+ "details": "Մանրամասներ"
},
"asset": {
"remove": "Հեռացնել ակտիվը"
diff --git a/src/lang/id.json b/src/lang/id.json
index 2dcff7876..08f3bb5af 100644
--- a/src/lang/id.json
+++ b/src/lang/id.json
@@ -127,7 +127,8 @@
"reserved": "- Dicadangkan",
"total": "Total"
},
- "totalAssetsValue": "Nilai total aset Anda:"
+ "totalAssetsValue": "Nilai total aset Anda:",
+ "details": "Rincian"
},
"asset": {
"remove": "Hapus aset"
diff --git a/src/lang/it.json b/src/lang/it.json
index 5e310fec7..b193bada9 100644
--- a/src/lang/it.json
+++ b/src/lang/it.json
@@ -127,7 +127,8 @@
"reserved": "- Riservato",
"total": "Totale"
},
- "totalAssetsValue": "Il valore totale del tuo patrimonio:"
+ "totalAssetsValue": "Il valore totale del tuo patrimonio:",
+ "details": "Dettagli"
},
"asset": {
"remove": "Rimuovi l'asset"
diff --git a/src/lang/nl.json b/src/lang/nl.json
index c0784ae74..d2422e7c5 100644
--- a/src/lang/nl.json
+++ b/src/lang/nl.json
@@ -127,7 +127,8 @@
"reserved": " - Gereserveerd",
"total": "Totaal"
},
- "totalAssetsValue": "Totale waarde van bezittingen:"
+ "totalAssetsValue": "Totale waarde van bezittingen:",
+ "details": "Details"
},
"asset": {
"remove": "Asset verwijderen"
diff --git a/src/lang/no.json b/src/lang/no.json
index 6e227e958..48b45da73 100644
--- a/src/lang/no.json
+++ b/src/lang/no.json
@@ -127,7 +127,8 @@
"reserved": "- Reservert",
"total": "Totalt"
},
- "totalAssetsValue": "Totalverdi aktiva:"
+ "totalAssetsValue": "Totalverdi aktiva:",
+ "details": "Detaljer"
},
"asset": {
"remove": "Fjern aktiva"
diff --git a/src/lang/pl.json b/src/lang/pl.json
index 87514e8b2..27ba5a53c 100644
--- a/src/lang/pl.json
+++ b/src/lang/pl.json
@@ -127,7 +127,8 @@
"reserved": " – Zarezerwowano",
"total": "Łącznie"
},
- "totalAssetsValue": "Twoja łączna wartość walut:"
+ "totalAssetsValue": "Twoja łączna wartość walut:",
+ "details": "Szczegóły"
},
"asset": {
"remove": "Usuń walutę"
diff --git a/src/lang/ru.json b/src/lang/ru.json
index 917d214ec..3a7541324 100644
--- a/src/lang/ru.json
+++ b/src/lang/ru.json
@@ -127,7 +127,8 @@
"reserved": " - Зарезервировано",
"total": "Всего"
},
- "totalAssetsValue": "Общая стоимость ваших активов:"
+ "totalAssetsValue": "Общая стоимость ваших активов:",
+ "details": "Детали"
},
"asset": {
"remove": "Удалить актив"
diff --git a/src/lang/yo.json b/src/lang/yo.json
index 825178bd6..8f766a4d6 100644
--- a/src/lang/yo.json
+++ b/src/lang/yo.json
@@ -127,7 +127,8 @@
"reserved": "- Ni ipamọ",
"total": "Lapapọ"
},
- "totalAssetsValue": "Iye awọn ohun -ini rẹ lapapọ:"
+ "totalAssetsValue": "Iye awọn ohun -ini rẹ lapapọ:",
+ "details": "Awọn alaye"
},
"asset": {
"remove": "Yọ dukia kuro"
diff --git a/src/views/AddLiquidity.vue b/src/views/AddLiquidity.vue
index d87a9de4d..5f9215ad6 100644
--- a/src/views/AddLiquidity.vue
+++ b/src/views/AddLiquidity.vue
@@ -29,7 +29,7 @@
value-can-be-hidden
with-left-shift
value-class="input-value--primary"
- :value="getTokenBalance(firstToken)"
+ :value="getFormattedTokenBalance(firstToken)"
:fiat-value="getFiatBalance(firstToken)"
/>
@@ -82,7 +82,7 @@
value-can-be-hidden
with-left-shift
value-class="input-value--primary"
- :value="getTokenBalance(secondToken)"
+ :value="getFormattedTokenBalance(secondToken)"
:fiat-value="getFiatBalance(secondToken)"
/>
@@ -219,7 +219,11 @@
@confirm="handleConfirmAddLiquidity"
/>
-
+
@@ -351,12 +355,15 @@ export default class AddLiquidity extends Mixins(mixins.NetworkFeeWarningMixin,
return `${this.getFPNumberFromCodec(strategicBonusApy).mul(this.Hundred).toLocaleString()}%`;
}
+ get removeLiquidityFormattedFee(): string {
+ return this.formatCodecNumber(this.networkFees.RemoveLiquidity);
+ }
+
get isXorSufficientForNextOperation(): boolean {
return this.isXorSufficientForNextTx({
type: Operation.AddLiquidity,
- amount: this.getFPNumber(this.firstTokenValue).toCodecString(),
- xorBalance: this.getFPNumber(this.getTokenBalance(this.firstToken)).toCodecString(),
- fee: this.networkFee,
+ amount: this.getFPNumber(this.firstTokenValue),
+ xorBalance: this.getFPNumberFromCodec(this.getTokenBalance(this.firstToken)),
});
}
@@ -373,8 +380,11 @@ export default class AddLiquidity extends Mixins(mixins.NetworkFeeWarningMixin,
if (!this.isXorSufficientForNextOperation) {
this.openWarningFeeDialog();
await this.waitOnNextTxFailureConfirmation();
+ if (!this.isWarningFeeDialogConfirmed) {
+ return;
+ }
+ this.isWarningFeeDialogConfirmed = false;
}
-
this.openConfirmDialog();
}
diff --git a/src/views/Bridge.vue b/src/views/Bridge.vue
index 8aef45811..24746109a 100644
--- a/src/views/Bridge.vue
+++ b/src/views/Bridge.vue
@@ -233,7 +233,11 @@
:sora-network-fee="soraNetworkFee"
@confirm="confirmTransaction"
/>
-
+
@@ -450,9 +454,8 @@ export default class Bridge extends Mixins(
return this.isXorSufficientForNextTx({
type: this.isSoraToEvm ? Operation.EthBridgeOutgoing : Operation.EthBridgeIncoming,
isXorAccountAsset: isXorAccountAsset(this.asset),
- amount: this.getFPNumber(this.amount).toCodecString(),
- xorBalance: getAssetBalance(this.tokenXOR),
- fee: this.soraNetworkFee,
+ amount: this.getFPNumber(this.amount),
+ xorBalance: this.getFPNumberFromCodec(getAssetBalance(this.tokenXOR)),
});
}
@@ -520,6 +523,10 @@ export default class Bridge extends Mixins(
if (!this.isXorSufficientForNextOperation) {
this.openWarningFeeDialog();
await this.waitOnNextTxFailureConfirmation();
+ if (!this.isWarningFeeDialogConfirmed) {
+ return;
+ }
+ this.isWarningFeeDialogConfirmed = false;
}
await this.checkConnectionToExternalAccount(() => {
diff --git a/src/views/CreatePair.vue b/src/views/CreatePair.vue
index cb8d351b4..09ed5330f 100644
--- a/src/views/CreatePair.vue
+++ b/src/views/CreatePair.vue
@@ -28,7 +28,7 @@
value-can-be-hidden
with-left-shift
value-class="input-value--primary"
- :value="getTokenBalance(firstToken)"
+ :value="getFormattedTokenBalance(firstToken)"
:fiat-value="getFiatBalance(firstToken)"
/>
@@ -80,7 +80,7 @@
value-can-be-hidden
with-left-shift
value-class="input-value--primary"
- :value="getTokenBalance(secondToken)"
+ :value="getFormattedTokenBalance(secondToken)"
:fiat-value="getFiatBalance(secondToken)"
/>
@@ -212,7 +212,11 @@
@confirm="confirmCreatePair"
/>
-
+
@@ -261,9 +265,8 @@ export default class CreatePair extends Mixins(mixins.NetworkFeeWarningMixin, To
get isXorSufficientForNextOperation(): boolean {
return this.isXorSufficientForNextTx({
type: Operation.CreatePair,
- amount: this.getFPNumber(this.firstTokenValue).toCodecString(),
- xorBalance: this.getFPNumber(this.getTokenBalance(this.firstToken)).toCodecString(),
- fee: this.getFPNumber(this.formattedFee).toCodecString(),
+ amount: this.getFPNumber(this.firstTokenValue),
+ xorBalance: this.getFPNumberFromCodec(this.getTokenBalance(this.firstToken)),
});
}
@@ -277,8 +280,11 @@ export default class CreatePair extends Mixins(mixins.NetworkFeeWarningMixin, To
if (!this.isXorSufficientForNextOperation) {
this.openWarningFeeDialog();
await this.waitOnNextTxFailureConfirmation();
+ if (!this.isWarningFeeDialogConfirmed) {
+ return;
+ }
+ this.isWarningFeeDialogConfirmed = false;
}
-
this.openConfirmDialog();
}
diff --git a/src/views/RemoveLiquidity.vue b/src/views/RemoveLiquidity.vue
index e3cbc053b..dcff567b2 100644
--- a/src/views/RemoveLiquidity.vue
+++ b/src/views/RemoveLiquidity.vue
@@ -155,7 +155,11 @@
@confirm="handleConfirmRemoveLiquidity"
/>
-
+
@@ -205,8 +209,6 @@ export default class RemoveLiquidity extends Mixins(
readonly KnownSymbols = KnownSymbols;
readonly delimiters = FPNumber.DELIMITERS_CONFIG;
- @Getter networkFees!: NetworkFeesObject;
-
@State((state) => state[namespace].liquidityAmount) liquidityAmount!: string;
@State((state) => state[namespace].firstTokenAmount) firstTokenAmount!: string;
@State((state) => state[namespace].secondTokenAmount) secondTokenAmount!: string;
@@ -345,10 +347,10 @@ export default class RemoveLiquidity extends Mixins(
}
get isXorSufficientForNextOperation(): boolean {
+ const firstTokenAmount = this.getFPNumber(this.firstTokenAmount);
return this.isXorSufficientForNextTx({
type: Operation.RemoveLiquidity,
- xorBalance: getAssetBalance(this.tokenXOR),
- fee: this.networkFee,
+ xorBalance: this.getFPNumberFromCodec(getAssetBalance(this.tokenXOR)).add(firstTokenAmount),
});
}
@@ -404,8 +406,11 @@ export default class RemoveLiquidity extends Mixins(
if (!this.isXorSufficientForNextOperation) {
this.openWarningFeeDialog();
await this.waitOnNextTxFailureConfirmation();
+ if (!this.isWarningFeeDialogConfirmed) {
+ return;
+ }
+ this.isWarningFeeDialogConfirmed = false;
}
-
this.openConfirmDialog();
}
diff --git a/yarn.lock b/yarn.lock
index 8304d5b6e..2504167a4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2181,10 +2181,10 @@
vuex "^3.1.3"
vuex-class "^0.3.2"
-"@soramitsu/soraneo-wallet-web@1.6.37":
- version "1.6.37"
- resolved "https://nexus.iroha.tech/repository/npm-group/@soramitsu/soraneo-wallet-web/-/soraneo-wallet-web-1.6.37.tgz#43f6dce946fdecff523985ee8af16add8fe0c4b5"
- integrity sha512-nX75AAx4CuL+84RB0ytVmBNczekiAZNusbQjfhKGfK9/huobVVtm5QR115KVPwuG4v0JqBZb1k/+jFzh/RAhJA==
+"@soramitsu/soraneo-wallet-web@1.6.41":
+ version "1.6.41"
+ resolved "https://nexus.iroha.tech/repository/npm-group/@soramitsu/soraneo-wallet-web/-/soraneo-wallet-web-1.6.41.tgz#91a0548c629d637fd72d2b6539d50394138e04d1"
+ integrity sha512-1XGuKGGJkZg2DbjTdKttLHuTQgLMcVvGzIYXMAaVZQSGArmfIE9nsUrqjO9lbgSR7uFneQzwZa5kmAJqvYmXaA==
dependencies:
"@polkadot/extension-dapp" "^0.35.0-beta.35"
"@polkadot/vue-identicon" "^0.72.1"