Skip to content

Commit

Permalink
Fix a mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Thunnini committed Oct 16, 2024
1 parent c58b59f commit fde701c
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions packages/background/src/token-scan/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,28 @@ export class TokenScanService {
.toString(10);

if (amount !== "0") {
tokenScan.infos.push({
starknetHexAddress,
assets: [
{
// XXX: Starknet의 경우는 여러 주소가 나올수가 없으므로
// starknetHexAddress는 같은 값으로 나온다고 생각하고 처리한다.
if (tokenScan.infos.length === 0) {
tokenScan.infos.push({
starknetHexAddress,
assets: [
{
currency,
amount,
},
],
});
} else {
if (
tokenScan.infos[0].starknetHexAddress === starknetHexAddress
) {
tokenScan.infos[0].assets.push({
currency,
amount,
},
],
});
});
}
}
}
}
})
Expand Down

0 comments on commit fde701c

Please sign in to comment.