Skip to content

Commit 3974600

Browse files
committed
fix transferring xlms
1 parent 488ca66 commit 3974600

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/stellar_client/lib/src/client.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,10 @@ class Client {
365365
throw Exception('Balance with asset code ${currency} not found.');
366366
});
367367
// check that receiver account exists
368-
final receiver = await _sdk.accounts.account(accountId);
368+
final balance = await getBalanceByAccountID(
369+
network: _network, accountId: destinationAddress);
369370
// check that asset exists
370-
var specificBalance = receiver.balances.firstWhere(
371+
var specificBalance = balance.firstWhere(
371372
(balance) => balance.assetCode == currency,
372373
orElse: () {
373374
throw Exception('Balance with asset code ${currency} not found.');

0 commit comments

Comments
 (0)