From fda3b6c35445ba14a411575ecc3cbb2ed0c54098 Mon Sep 17 00:00:00 2001 From: Reza Rahemtola Date: Tue, 21 May 2024 22:42:24 +0200 Subject: [PATCH 1/3] fix: Points number displayed --- src/components/AccountButton.vue | 4 ++++ src/stores/points.js | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/AccountButton.vue b/src/components/AccountButton.vue index 8765572..77779af 100644 --- a/src/components/AccountButton.vue +++ b/src/components/AccountButton.vue @@ -45,11 +45,14 @@ diff --git a/src/stores/points.js b/src/stores/points.js index bbd98ce..63498d1 100644 --- a/src/stores/points.js +++ b/src/stores/points.js @@ -75,7 +75,11 @@ export const usePoints = defineStore('points', { getAddressRealtimePoints(address) { const pendingInfo = this.getAddressRealtimePendingPointsInfo(address); - return this.getAddressPoints(address) + pendingInfo.pending; + const addressPoints = this.getAddressPoints(address); + if (Number.isNaN(pendingInfo.pending)) { + return addressPoints; + } + return addressPoints + pendingInfo.pending; }, }, }); From 4615e1a43d3653fe2dd0c689fec1869e2cfba201 Mon Sep 17 00:00:00 2001 From: Reza Rahemtola Date: Tue, 21 May 2024 23:13:47 +0200 Subject: [PATCH 2/3] fix: Remove useless styles and reordering props (auto with webstorm) --- src/components/AccountButton.vue | 76 ++++++-------------------------- 1 file changed, 14 insertions(+), 62 deletions(-) diff --git a/src/components/AccountButton.vue b/src/components/AccountButton.vue index 77779af..863c696 100644 --- a/src/components/AccountButton.vue +++ b/src/components/AccountButton.vue @@ -1,40 +1,40 @@