Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jonator committed Jun 4, 2024
1 parent 1e0f4ed commit fe49c06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/tx/src/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export function getSumTotalSpenderCoinsSpent(
if (type !== "coin_spent") return;
if (attributes.length === 0) return;
const spendAttribute = attributes.find((attr) => attr.key === "spender");
if (!spendAttribute) return;
if (spendAttribute.value !== spenderBech32Address) return;
if (!spendAttribute || spendAttribute.value !== spenderBech32Address)
return;

// a comma separated list of coins spent
const coinsSpentRawAttribute = attributes.find(
Expand Down
4 changes: 2 additions & 2 deletions packages/tx/src/gas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,12 @@ export async function getGasFeeAmount({
const feeBalances: { denom: string; amount: string }[] = [];

// iterate in order of fee denoms
chainFeeDenoms.forEach((denom) => {
for (const denom of chainFeeDenoms) {
const balance = balances.find((balance) => balance.denom === denom);
if (balance) {
feeBalances.push(balance);
}
});
}

if (!feeBalances.length) {
throw new InsufficientFeeError(
Expand Down

0 comments on commit fe49c06

Please sign in to comment.