Skip to content

Commit

Permalink
[fix][652] check method name (#3588)
Browse files Browse the repository at this point in the history
* feat: update UI send method transaction

* merged from sere

* remove unused code

* Update: check method name
  • Loading branch information
TranTrungTien authored Jul 5, 2024
1 parent f840bdd commit a05a8d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,8 @@ 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
4 changes: 2 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,8 @@ 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

0 comments on commit a05a8d0

Please sign in to comment.