Skip to content

Commit

Permalink
Merge pull request #170 from Polygant/release/1.3.7
Browse files Browse the repository at this point in the history
Release/1.3.7
  • Loading branch information
GreemDark authored Oct 4, 2023
2 parents a0e5192 + 7e0be8c commit faa54e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 35 deletions.
42 changes: 9 additions & 33 deletions src/modules/wallet/pages/Withdrawal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export default {
return {
selectedCoin: "",
openedAction: "",
networksList: [],
selectedDefault: this.$route?.params?.walletitem,
openedActionProperties: {},
payout_form_view: "pending",
Expand Down Expand Up @@ -161,11 +160,13 @@ export default {
}
},
},
mounted() {
this.$store.dispatch("core/getCoinsLimits");
this.loadWallets();
async mounted() {
await Promise.all([
this.$store.dispatch("core/getCoinsLimits"),
this.loadWallets(),
this.$store.dispatch("core/getUserNotifications"),
]);
this.showSecurityNotice();
this.$store.dispatch("core/getUserNotifications");
if (this.isConnectedSocket) {
if (localStorage.getItem("token")) {
this.$store.dispatch(
Expand All @@ -179,9 +180,7 @@ export default {
this.getWalletHistory();
}
}
setTimeout(() => {
this.coinSelected(this.$route?.params?.walletitem, this.coins);
}, 300);
this.cryptoWithdrawalClickHandler(this.$route?.params?.walletitem);
},
beforeUnmount() {
this.unsubscribeWsData();
Expand All @@ -200,29 +199,6 @@ export default {
});
}
},
coinSelected(value, coins) {
if (coins) {
this.selectedCoin = { coin: value, ...coins[value] };
} else {
this.selectedDefault = "";
this.selectedCoin = { coin: value, ...this.filteredCoins[value] };
}
this.networksList = {};
if (typeof this.selectedCoin.is_fiat === "undefined") {
this.networksList[this.selectedCoin.coin] = {
id: this.selectedCoin.coin,
name: `${this.formatingCommission(
this.selectedCoin?.fee?.withdrawal.address
)} ${this.selectedCoin.coin}`,
action: () =>
this.cryptoWithdrawalClickHandler(this.selectedCoin.coin),
};
}
this.networksList[Object.values(this.networksList)[0].id].action();
},
networkSelected(id) {
this.networksList[id].action();
},
blockchainCurrencyByCoin(coin) {
return coin.blockchain_list
? coin.blockchain_list.map((code) => ({
Expand Down Expand Up @@ -363,8 +339,8 @@ export default {
this.sendSocketMessage("del_balance", {}, false, true);
this.sendSocketMessage("del_wallet_withdrawals_history", {}, false, true);
},
loadWallets() {
this.$http.post("getwallets/", {}).then((response) => {
async loadWallets() {
await this.$http.post("getwallets/", {}).then((response) => {
response.data.forEach((wallet) => {
if (!this.coins[wallet.currency]) {
this.coins[wallet.currency] = {};
Expand Down
4 changes: 2 additions & 2 deletions src/store/core/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export default {
commit(mutationTypes.COINS_LIMITS_UPDATE, response);
});
},
getUserNotifications({ commit }) {
UserNotifications.get().then((response) => {
async getUserNotifications({ commit }) {
await UserNotifications.get().then((response) => {
commit(mutationTypes.USER_NOTIFICATION, response);
});
},
Expand Down

0 comments on commit faa54e3

Please sign in to comment.