From 8460d364b81c9dcb266024f48145e9be79e6d00d Mon Sep 17 00:00:00 2001 From: Max Voloshinskii Date: Mon, 13 May 2024 11:42:08 +0300 Subject: [PATCH] fix(mobile): fix loadBatteryConfig --- packages/mobile/src/core/BatterySend/BatterySend.tsx | 2 +- packages/mobile/src/wallet/Wallet/WalletContent.ts | 2 -- packages/mobile/src/wallet/managers/BatteryManager.ts | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/mobile/src/core/BatterySend/BatterySend.tsx b/packages/mobile/src/core/BatterySend/BatterySend.tsx index b3abed60b..bbace34d3 100644 --- a/packages/mobile/src/core/BatterySend/BatterySend.tsx +++ b/packages/mobile/src/core/BatterySend/BatterySend.tsx @@ -117,7 +117,7 @@ export const BatterySend: React.FC = ({ route }) => { messages: [ { amount: AmountFormatter.toNano(parsedAmount, rechargeMethod.decimals), - address: tk.wallet.battery.state.data.fundReceiver!, + address: tk.wallet.battery.fundReceiver!, payload: commentCell.toBoc().toString('base64'), }, ], diff --git a/packages/mobile/src/wallet/Wallet/WalletContent.ts b/packages/mobile/src/wallet/Wallet/WalletContent.ts index 5aa8b7c66..0695546ed 100644 --- a/packages/mobile/src/wallet/Wallet/WalletContent.ts +++ b/packages/mobile/src/wallet/Wallet/WalletContent.ts @@ -176,7 +176,6 @@ export class WalletContent extends WalletBase { this.staking.load(), this.subscriptions.load(), this.battery.load(), - this.battery.loadBatteryConfig(), this.activityList.load(), this.cards.load(), ]); @@ -191,7 +190,6 @@ export class WalletContent extends WalletBase { this.staking.reload(), this.subscriptions.reload(), this.battery.load(), - this.battery.loadBatteryConfig(), this.activityList.reload(), this.cards.load(), ]); diff --git a/packages/mobile/src/wallet/managers/BatteryManager.ts b/packages/mobile/src/wallet/managers/BatteryManager.ts index 49796653d..ddc2a3abe 100644 --- a/packages/mobile/src/wallet/managers/BatteryManager.ts +++ b/packages/mobile/src/wallet/managers/BatteryManager.ts @@ -285,7 +285,7 @@ export class BatteryManager { } public async load() { - return this.fetchBalance(); + return await Promise.all([this.fetchBalance(), this.loadBatteryConfig()]); } public async rehydrate() {