Skip to content

Commit

Permalink
Merge pull request #116 from NazarUsov/testnet/issues
Browse files Browse the repository at this point in the history
Hot fix for "isSelfTransaction"
  • Loading branch information
sowle authored May 14, 2024
2 parents 9c56583 + ca66ec7 commit ca4115e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,8 @@ export class HistoryComponent implements OnInit, OnDestroy {
const { remote_addresses, employed_entries: { receive, spent }, subtransfers, fee } = transaction;

const condition1 = remote_addresses?.includes(this.variablesService.currentWallet?.address);
const condition2 = [...receive, ...spent].map(({ asset_id }) => asset_id === zanoAssetInfo.asset_id).every(Boolean);
const condition3 = subtransfers.length === 1 && subtransfers[0].asset_id === zanoAssetInfo.asset_id && subtransfers[0].amount.eq(fee);
const condition2 = [...(receive ?? []), ...(spent ?? [])].map(({ asset_id }) => asset_id === zanoAssetInfo.asset_id).every(Boolean);
const condition3 = subtransfers?.length === 1 && subtransfers[0].asset_id === zanoAssetInfo.asset_id && subtransfers[0].amount.eq(fee);

return condition1 && condition2 && condition3;
}
Expand Down

0 comments on commit ca4115e

Please sign in to comment.