Skip to content

Commit

Permalink
[fix][610] fix export address file name (#3594)
Browse files Browse the repository at this point in the history
* [fix][610] fix export address file name

* fix filter erc721_activities
  • Loading branch information
sonhv authored Jul 5, 2024
1 parent 8a7f53e commit 16bb857
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/app/core/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,10 @@ export class UserService {
type
}
erc721_activities(
where: { _or: [{ to: { _eq: $receiver } }, { from: { _eq: $sender } }] }
where: {
_or: [{ to: { _eq: $receiver } }, { from: { _eq: $sender } }]
action: { _in: $actionIn, _nin: $actionNotIn }
}
) {
action
from
Expand Down
4 changes: 3 additions & 1 deletion src/app/pages/export-csv/export-csv.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,13 @@ export class ExportCsvComponent implements OnInit, OnDestroy {
type: 'text/csv;charset=utf-8',
});

const evmAddressTypes = [TabsAccountLink.EVMExecutedTxs, ETypeFtExport.ERC20, ETypeNftExport.ERC721];
const address = evmAddressTypes.includes(payload.dataType) ? payload.evmAddress : payload.address;
const fileName =
'export-account-' +
(payload.dataType === TabsAccountLink.NativeTxs ? 'native-ibc-transfer' : nameTab) +
'-' +
payload.address +
address +
'.csv';
saveAs(data, fileName);
this.isDownload = false;
Expand Down

0 comments on commit 16bb857

Please sign in to comment.