Skip to content

Commit

Permalink
[fix][652] check method name (#3589)
Browse files Browse the repository at this point in the history
* [fix][598] fix set token info

* feat: update UI send method transaction

* fix: send detail transaction

* remove unused code

* Update: check method name
  • Loading branch information
TranTrungTien committed Jul 5, 2024
1 parent 3656bc0 commit 28fc9f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,7 @@ export class AccountTransactionTableComponent implements OnInit, OnDestroy {
const methodId = _.get(tx, 'data')?.substring(0, 8);
const isEvmContract = evmList?.evm_smart_contract?.some((evm) => evm?.address === tx?.to)
let method = mappingMethodName(element, methodId)
if(!isEvmContract) method = 'Send';
if(!tx?.to) method = 'Create Contract';
if (tx?.to && !isEvmContract) method = 'Send';

tx['method'] = method;
});
Expand Down
5 changes: 3 additions & 2 deletions src/app/pages/evm-transactions/evm-transactions.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ export class EvmTransactionsComponent {
const trans = res.map((i: any) => {

const toIsEvmContract = smartContractList.filter((s) => s === i.to)?.length > 0;
let type = !toIsEvmContract ? 'Send' : i?.type;
if(i?.type === EMethodContract.Creation) type = 'Create Contract';

let type = i?.type;
if (i?.to && !toIsEvmContract) type = 'Send';

return {
...i,
Expand Down
2 changes: 1 addition & 1 deletion src/assets/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@
}
}
}
}
}

0 comments on commit 28fc9f0

Please sign in to comment.