diff --git a/frontend/src/components/TransferFundsButton.tsx b/frontend/src/components/TransferFundsButton.tsx index 38f44953..4076fd16 100644 --- a/frontend/src/components/TransferFundsButton.tsx +++ b/frontend/src/components/TransferFundsButton.tsx @@ -7,7 +7,7 @@ import { request } from "src/utils/request"; type TransferFundsButtonProps = { channels: Channel[] | undefined; albyBalance: AlbyBalance; - onTransferComplete: () => Promise; + onTransferComplete: () => Promise; } & ButtonProps; export function TransferFundsButton({ diff --git a/frontend/src/screens/channels/Channels.tsx b/frontend/src/screens/channels/Channels.tsx index c5f725c2..24554225 100644 --- a/frontend/src/screens/channels/Channels.tsx +++ b/frontend/src/screens/channels/Channels.tsx @@ -270,11 +270,13 @@ export default function Channels() { variant="outline" channels={channels} albyBalance={albyBalance} - onTransferComplete={async () => { - await reloadAlbyBalance(); - await reloadBalances(); - await reloadChannels(); - }} + onTransferComplete={() => + Promise.all([ + reloadAlbyBalance(), + reloadBalances(), + reloadChannels(), + ]) + } > Migrate diff --git a/frontend/src/screens/wallet/index.tsx b/frontend/src/screens/wallet/index.tsx index c2eab816..a43b07c0 100644 --- a/frontend/src/screens/wallet/index.tsx +++ b/frontend/src/screens/wallet/index.tsx @@ -63,11 +63,13 @@ function Wallet() { { - await reloadAlbyBalance(); - await reloadBalances(); - await reloadTransactions(); - }} + onTransferComplete={() => + Promise.all([ + reloadAlbyBalance(), + reloadBalances(), + reloadTransactions(), + ]) + } > Migrate Funds