Skip to content

Commit 3f4b8d1

Browse files
committed
fix workflow
1 parent ce14d21 commit 3f4b8d1

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

packages/stellar_client/lib/src/client.dart

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -138,27 +138,26 @@ class Client {
138138
}
139139

140140
Future<bool> addTrustLine() async {
141-
try {
142-
for (var entry in _currencies.currencies.entries) {
143-
String currencyCode = entry.key;
144-
currency.Currency currentCurrency = entry.value;
141+
for (var entry in _currencies.currencies.entries) {
142+
String currencyCode = entry.key;
143+
currency.Currency currentCurrency = entry.value;
145144

146-
String issuerAccountId = currentCurrency.issuer;
147-
Asset currencyAsset = AssetTypeCreditAlphaNum4(
148-
currentCurrency.assetCode, issuerAccountId);
145+
String issuerAccountId = currentCurrency.issuer;
146+
Asset currencyAsset =
147+
AssetTypeCreditAlphaNum4(currentCurrency.assetCode, issuerAccountId);
149148

150-
ChangeTrustOperationBuilder changeTrustOperation =
151-
ChangeTrustOperationBuilder(currencyAsset, "300000");
149+
ChangeTrustOperationBuilder changeTrustOperation =
150+
ChangeTrustOperationBuilder(currencyAsset, "300000");
152151

153-
final account = await _sdk.accounts.account(accountId);
152+
final account = await _sdk.accounts.account(accountId);
154153

155-
Transaction transaction = TransactionBuilder(account)
156-
.addOperation(changeTrustOperation.build())
157-
.build();
158-
transaction.sign(_keyPair, _stellarNetwork);
154+
Transaction transaction = TransactionBuilder(account)
155+
.addOperation(changeTrustOperation.build())
156+
.build();
157+
transaction.sign(_keyPair, _stellarNetwork);
159158

160-
SubmitTransactionResponse response =
161-
await _sdk.submitTransaction(transaction);
159+
SubmitTransactionResponse response =
160+
await _sdk.submitTransaction(transaction);
162161

163162
if (!response.success) {
164163
logger.e("Failed to add trustline for $currencyCode");
@@ -167,6 +166,7 @@ class Client {
167166
logger.i("trustline for $currencyCode was added successfully");
168167
return true;
169168
}
169+
}
170170

171171
logger.i("No trustlines were processed");
172172
return false;

0 commit comments

Comments
 (0)