Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/euphoria 20240717 #3643

Merged
merged 124 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
12a497e
[feat][Erc721] - implement token-tracker overview ,transfers tab, inv…
tamvb2391 May 9, 2024
570c2a0
[feat][Erc721] - implement token details page (#3378)
tamvb2391 May 10, 2024
985c25f
Merge pull request #3379 from aura-nw/baseline/serenity_20240510
tamvb2391 May 10, 2024
900b884
[feat-fix][Erc721] - fix method name (#3381)
tamvb2391 May 13, 2024
03be852
[feat-fix][Erc721] - fix read contract (#3383) (#3384)
tamvb2391 May 15, 2024
36b3a96
[feat][Erc721] - implement non fungible tokens list view (#3387)
tamvb2391 May 16, 2024
8d21db2
[feat-fix][Erc721] - fix show icon contract for tranfers tab, fix con…
tamvb2391 May 16, 2024
f9f3271
[feat][557] account detail ERC721 nfts (#3392)
sonhv May 17, 2024
27e96f2
[feat-fix][Erc721] - fix text (#3393)
tamvb2391 May 17, 2024
a427241
[feat][578] erc721 nft transfers (#3396)
sonhv May 20, 2024
860fc19
[feat][580] erc721 token tracker - holder tab (#3397)
tamvb2391 May 20, 2024
a0d00e1
[FeatFix][Erc721] fix contract icon (#3400)
sonhv May 20, 2024
3baf772
[featfix][erc721] fix nft filter order (#3402)
sonhv May 20, 2024
c10affc
[FeatFix][Erc721] fix holder tab (#3404)
tamvb2391 May 21, 2024
af0cf5a
fix: smartContractList is undefined at first render
TranTrungTien May 21, 2024
82baf48
Merge pull request #3406 from aura-nw/fix-bug/sere/dont-render-ui
TranTrungTien May 21, 2024
05ea2f8
fix: smartContractList is undefined at first render (holder tab)
TranTrungTien May 21, 2024
82a50ea
Merge pull request #3408 from aura-nw/fix-bug/sere/dont-render-ui
TranTrungTien May 21, 2024
ce7819c
[FeatFix][Erc721] fix holders tab (#3409)
tamvb2391 May 21, 2024
702e8d6
[FeatFix][Erc721] fix search Non-fungible Tokens (#3411)
tamvb2391 May 22, 2024
1d30d9b
[FeatFix][Erc721] fix search nft box (#3413)
tamvb2391 May 22, 2024
162115f
[FeatFix][Erc721] fix bug icon contract (#3415)
tamvb2391 May 22, 2024
53c044b
fix: no action when to click metamask (if metamask is not installed)
TranTrungTien May 23, 2024
d4f6951
Merge pull request #3419 from aura-nw/fix/sere/other-evm-wallets
TranTrungTien May 23, 2024
6c1d92b
[FeatFix][Erc721] fix bug token detail nft tranfer tab (#3420)
tamvb2391 May 23, 2024
0dc6ab6
[FeatFix][Erc721] fix write contract (#3422)
tamvb2391 May 23, 2024
8d69edb
[FeatFix][Erc721] fix search by name tag (#3425)
tamvb2391 May 24, 2024
ac5e0e9
[FeatFix][Erc721] fix text (#3426)
tamvb2391 May 24, 2024
c1da232
[FeatFix][Erc721] fix search private name tag (#3428)
tamvb2391 May 27, 2024
b4661bf
[FeatFix][Erc721] fix search (#3430)
tamvb2391 May 27, 2024
79d54af
[FeatFix][575] fix nft modal (#3433)
sonhv May 28, 2024
68e479d
fix: crash app when reading undefined var
TranTrungTien May 28, 2024
0496185
Merge pull request #3435 from aura-nw/fix/sere/crash-share-comp
TranTrungTien May 28, 2024
c82b869
fix: metamask redirect to home automatically although it's installed
TranTrungTien May 28, 2024
22b5853
Merge pull request #3436 from aura-nw/fix/sere/metamask_redirect
TranTrungTien May 28, 2024
c3f2175
Fix topics for Event Logs - Transaction details page (#3438)
tamvb2391 May 28, 2024
3379f0f
[Feat][595] implement staking for evm (#3441)
tamvb2391 May 29, 2024
56a5654
[FeatFix] fix link to token tracker (#3443)
tamvb2391 May 30, 2024
af2e6e0
[FeatFix] fix show icon contract (#3445)
tamvb2391 May 30, 2024
b9e87fb
[FeatFix] fix search non fungible tokens erc721 (#3448)
tamvb2391 May 30, 2024
fa1e407
[FeatFix][595] fix staking for evm , fix icon contract transaction c…
tamvb2391 May 31, 2024
e971903
[FeatFix] fix auto refresh transaction for contract detail page (#3454)
tamvb2391 May 31, 2024
0bd1fe2
[HotFix] fix search by address erc721 (#3462)
tamvb2391 Jun 3, 2024
3b231c0
fix: highlight function [#613]
TranTrungTien Jun 4, 2024
960a4a4
feat: show fee_payer in cosmos transaction detail page
TranTrungTien Jun 3, 2024
e8aac73
[Feat][533] Display EVM address both upper case & normal case (#3465)
sonhv Jun 4, 2024
5f4dc39
[HotFix] fix bug switch evm chain (#3470)
tamvb2391 Jun 4, 2024
af2ce26
Merge pull request #3468 from aura-nw/feat/sere/fee-payer
TranTrungTien Jun 4, 2024
380b247
Merge pull request #3467 from aura-nw/fix/sere/font-color-event-log
TranTrungTien Jun 4, 2024
a532ecd
[FeatFix][615] fix missing icon contract (#3474)
tamvb2391 Jun 4, 2024
3e681ae
change inter font to space mono font for input methor, event log in t…
TranTrungTien Jun 4, 2024
3803e34
Merge pull request #3475 from aura-nw/fix/sere/font-event-log
TranTrungTien Jun 5, 2024
8777877
fix: update fee_payer field
TranTrungTien Jun 5, 2024
e5620d1
Merge pull request #3478 from aura-nw/fix/sere/fee_payer_field
TranTrungTien Jun 5, 2024
9626551
update: fee_payer field
TranTrungTien Jun 5, 2024
64204e2
Merge pull request #3480 from aura-nw/fix/sere/fee_payer_field
TranTrungTien Jun 5, 2024
3ccc377
[FeatFix][582] - validate bool type for read/write contract (#3484)
tamvb2391 Jun 7, 2024
3784ef2
[Feat][619] Warning for incompatible between cosmos address and evm a…
TranTrungTien Jun 7, 2024
5bcf31f
[Feat][602] add arrow icon (#3485)
tamvb2391 Jun 9, 2024
68e1764
[feat][620] highlight chain support (#3488)
sonhv Jun 10, 2024
452eda6
[Chore] fix check evm token burnt (#3491)
tamvb2391 Jun 11, 2024
570ae02
[Chore] fix query transfer evm token list (#3496)
tamvb2391 Jun 11, 2024
1e4a8c8
[Chore] fix show toast switch chain (#3499)
tamvb2391 Jun 11, 2024
4f4d9ee
Sere/fix/fix method name burn for ntf detail (#3502)
tamvb2391 Jun 11, 2024
eba429f
[featfix][547] fix Display and Search uppercase EVM address (#3505)
sonhv Jun 11, 2024
a73d0e4
[featfix][622] wallet text align (#3508)
sonhv Jun 11, 2024
844e1ed
[FeatFix] - fix bug no data in nft tranfer tab (#3512)
tamvb2391 Jun 12, 2024
4f7ce7b
[FeatFix] fix orderby queryEvmTransactionList (#3515)
tamvb2391 Jun 12, 2024
e802ec3
[FeatFix][573] fix query search non-fungible-tokens list (#3518)
tamvb2391 Jun 13, 2024
25195bb
[feat][610] export csv (#3523)
sonhv Jun 13, 2024
c5458a3
[fix][533] fix search evm contract nfts (#3529)
sonhv Jun 13, 2024
0e62b3b
[Chore] feature flags (#3530)
sonhv Jun 13, 2024
ba5389e
[]featfix][620] fix wallet connect responsive (#3533)
sonhv Jun 13, 2024
f6b102e
[fix][533] fix search by token id (#3537)
sonhv Jun 14, 2024
d40e448
[fix][bug-erc721] [11] fix change wallet (#3544)
tamvb2391 Jun 18, 2024
52d1568
[chore][setting] - update editorconfig (#3548)
duongynguyen Jun 18, 2024
c19cb4b
[sere][fix][29] - not show arrow icon in account detail page (#3549)
duongynguyen Jun 18, 2024
477867c
[fix][17] - Text Owner and address are not align with each other (#3551)
duongynguyen Jun 18, 2024
5d84a63
[Feat][619] Update query cosmos and evm (#3542)
TranTrungTien Jun 18, 2024
4934ea9
[fix][bug-erc721] [35] fix search address (#3553)
tamvb2391 Jun 18, 2024
ca11f29
[feat][598]: show token info (#3535)
TranTrungTien Jun 18, 2024
7193926
[fix][9] - show disconnect link on write contract page (#3556)
duongynguyen Jun 18, 2024
47f7be1
[fix][12] - missing word in holder tab (#3557)
duongynguyen Jun 19, 2024
43c377c
[fix][36] - show normal text for height block (#3559)
duongynguyen Jun 20, 2024
7ce2308
[fix][28] - responsive value of method (#3561)
duongynguyen Jun 21, 2024
555b144
[fix][654] - NFT transfer is missing transaction (#3564)
duongynguyen Jun 21, 2024
533bb91
[fix][26] - evm transactions responsive (#3565)
duongynguyen Jun 24, 2024
4d6a6aa
[hotfix][662] add USDC token as default (#3567)
TranTrungTien Jun 25, 2024
c8aa128
[hotfix][662] change usdc token type. (#3568)
TranTrungTien Jun 26, 2024
5f61503
[fix][622]: fix wrong usdc token url. (#3569)
TranTrungTien Jun 27, 2024
7e2e8e4
[Feat][655] Enhance event log (#3571)
TranTrungTien Jul 1, 2024
3362972
[fix][622] fix conflict between token-market api and evm-token-detail…
TranTrungTien Jul 1, 2024
5ef6157
feat: update UI send method transaction (#3573)
TranTrungTien Jul 1, 2024
b54a330
[feat][619] Update new design incompatible address (#3576)
TranTrungTien Jul 1, 2024
c3f9af5
[feat] enhance event log (#3581)
tamvb2391 Jul 3, 2024
bc14d85
[fix][655] fix event log (#3584)
TranTrungTien Jul 4, 2024
0eb6f6f
[fix][652] fix send method (#3587)
TranTrungTien Jul 5, 2024
f840bdd
[feat][622] update wallet connect UI (#3592)
sonhv Jul 5, 2024
a05a8d0
[fix][652] check method name (#3588)
TranTrungTien Jul 5, 2024
780bf8d
[fix][619] evm and cosmos warning, remove redundant character (#3590)
TranTrungTien Jul 5, 2024
e5e35de
[fix][610] fix export address file name (#3595)
sonhv Jul 5, 2024
68ffe33
fix: disable decode when transaction is send with memo (#3597)
TranTrungTien Jul 5, 2024
de33950
[Update] USDT information (#3600)
TranTrungTien Jul 8, 2024
dbf346f
fix: compare big number fungible tokens table (#3602)
TranTrungTien Jul 10, 2024
76b7ffa
[fix][619] logic check receive token firstly (#3605)
TranTrungTien Jul 10, 2024
bba9695
[update][619] hard code base account (#3608)
TranTrungTien Jul 10, 2024
8b8d78e
[fix][655]fix event log (#3611)
TranTrungTien Jul 10, 2024
c5c07b4
[Fix][589] Fix set token info (#3603) (#3610)
TranTrungTien Jul 10, 2024
48f9234
[update][619] update logic check wallet type (#3614)
TranTrungTien Jul 10, 2024
dd238bc
[fix][652] convert hex to string memo (#3616)
TranTrungTien Jul 10, 2024
0b7a013
[Update][619] convert call data account info from horo to lcd (#3620)
TranTrungTien Jul 11, 2024
0fdcac8
fix: Total Value (#3622)
TranTrungTien Jul 12, 2024
d1f083c
fix event log (#3624)
TranTrungTien Jul 12, 2024
2452a27
update: default balance value to prevent NaN (#3626)
TranTrungTien Jul 12, 2024
d5d7608
[update][655] responsive for mobile (#3628)
TranTrungTien Jul 15, 2024
fbe4da7
[fix] account detail error when address is cosmos contract (#3629)
tamvb2391 Jul 15, 2024
bb9b136
[featfix] add feature flag for enhance event log and token info (#3631)
tamvb2391 Jul 15, 2024
b046507
[update][655] decode tuple in data (#3633)
TranTrungTien Jul 15, 2024
2b9b9e4
[featfix] fix feature flag for enhance event log (#3634)
tamvb2391 Jul 15, 2024
1fa9a42
[update][655] style event log after add ff (#3637)
TranTrungTien Jul 16, 2024
2720897
[update][655] revert font-size, height event log (#3641)
TranTrungTien Jul 16, 2024
970df38
[update][597] set token info after ff (#3640)
TranTrungTien Jul 16, 2024
a568d5b
Merge remote-tracking branch 'origin/serenity' into release/euphoria_…
TranTrungTien Jul 17, 2024
da3a0f6
tongle ff on for event log
TranTrungTien Jul 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/feature-flags/euphoria/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "devTest": false, "enhanceEventLog": false, "setTokenInfo": false }
{ "devTest": false, "enhanceEventLog": true, "setTokenInfo": false }
1 change: 1 addition & 0 deletions src/app/core/data-services/api-cw20-token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export class ApiCw20TokenService {
const name = await contract.name();
const symbol = await contract.symbol();
const decimals = await contract.decimals();

return {
...USDC_TOKEN,
tokenUrl: USDC_ADDRESS,
Expand Down
10 changes: 5 additions & 5 deletions src/app/core/services/wallet.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export class WalletService implements OnDestroy {
};

(window as any).ethereum?.on('accountsChanged', () => {
this.connectEvmWallet(true);
this.connectEvmWallet(true).then().catch();
});
(window as any).ethereum?.on('chainChanged', reconnect);
}
Expand Down Expand Up @@ -427,7 +427,7 @@ export class WalletService implements OnDestroy {
async connectEvmWallet(changedWallet = false) {
const connected = await this.connectToChain();
if (!changedWallet && !connected) {
return;
throw Error('Can not connect!');
}

getSigner(this.env.etherJsonRpc).then((signer) => {
Expand Down Expand Up @@ -461,10 +461,10 @@ export class WalletService implements OnDestroy {
await addNetwork(this.env.evmChainInfo);
break;
case 4001:
// This error code : "User rejected the request."
return false;
// This error code : "User rejected the request."
case -32002:
// This error code : "Request of type 'wallet_switchEthereumChain' already pending"
// This error code : "Request of type 'wallet_switchEthereumChain' already pending"
default:
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,23 @@
<div class="d-flex align-items-center py-2">
<span class="first-col text--gray-5">Official Site:</span>
<a *ngIf="tokenDetail?.officialSite" [href]="tokenDetail?.officialSite" target="_blank"
rel="noopener noreferrer" class="text--primary">{{tokenDetail?.officialSite}}</a>
rel="noopener noreferrer" class="text--primary text-truncate">{{tokenDetail?.officialSite}}</a>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="d-flex align-items-center py-2">
<div class="d-flex align-items-start py-2">
<div class="first-col text--gray-5">
Social Profiles:
</div>
<div class="socials" *ngIf="tokenDetail?.socialProfiles?.length">
<a *ngFor="let item of tokenDetail?.socialProfiles" [href]="item?.url" target="_blank"
rel="noopener noreferrer">
<img [src]="item?.icon" alt="social-media">
</a>
<div *ngIf="tokenDetail?.socialProfiles?.length">
<div class="socials">
<a *ngFor="let item of tokenDetail?.socialProfiles" [href]="item?.url" target="_blank"
rel="noopener noreferrer">
<img [src]="item?.icon" alt="social-media">
</a>
</div>
</div>
</div>
</td>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.box-token-info {
table.aura-basic-table {
table-layout: fixed;

tr,
td {
color: var(--aura-contract);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,22 @@ export class TokenContentComponent implements OnInit {
key: tab.key,
}));
this.tabsBackup = this.TABS;

this.route.queryParams.subscribe((params) => {
this.paramQuery = params?.a || '';
this.searchTemp = this.paramQuery;
this.handleSearch();
this.searchTemp = this.nameTagService.findNameTagByAddress(this.searchTemp);

if (this.featureFlag.isEnabled(FeatureFlags.SetTokenInfo)) {
if(!this.paramQuery){
this.TABS.push({
key: TokenTab.Info,
value: 'Info',
});
this.tabsBackup = this.TABS;
}
}
});

if (local.getItem(STORAGE_KEYS.IS_VERIFY_TAB) == 'true') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,23 @@
<div class="d-flex align-items-center py-2">
<span class="first-col text--gray-5">Official Site:</span>
<a *ngIf="tokenDetail?.officialSite" [href]="tokenDetail?.officialSite" target="_blank"
rel="noopener noreferrer" class="text--primary">{{tokenDetail?.officialSite}}</a>
rel="noopener noreferrer" class="text--primary text-truncate">{{tokenDetail?.officialSite}}</a>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="d-flex align-items-center py-2">
<div class="d-flex align-items-start py-2">
<div class="first-col text--gray-5">
Social Profiles:
</div>
<div class="socials" *ngIf="tokenDetail?.socialProfiles?.length">
<a *ngFor="let item of tokenDetail?.socialProfiles" [href]="item?.url" target="_blank"
rel="noopener noreferrer">
<img [src]="item?.icon" alt="social-media">
</a>
<div *ngIf="tokenDetail?.socialProfiles?.length">
<div class="socials">
<a *ngFor="let item of tokenDetail?.socialProfiles" [href]="item?.url" target="_blank"
rel="noopener noreferrer">
<img [src]="item?.icon" alt="social-media">
</a>
</div>
</div>
</div>
</td>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.box-token-info {
table.aura-basic-table {
table-layout: fixed;

tr,
td {
color: var(--aura-contract);
Expand All @@ -13,7 +15,8 @@
align-items: center;
justify-content: flex-start;
column-gap: 20px;

row-gap: 5px;
flex-wrap: wrap;
img {
min-width: 16px;
max-width: 16px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<p *ngIf="index !== ''" class="name">
{{index}} <span *ngIf="name">: {{ name }}</span>
</p>
<div *ngIf="isAllowSwitchDecode" class="dropdown aura-dropdown btn-item">
<div style="height: 24px;" *ngIf="isAllowSwitchDecode" class="dropdown aura-dropdown btn-item">
<button
style="height: 26px; min-width: max-content;"
class="button button--sm button--md-mob button-pill button-outline button-dropdown w-100"
style="min-width: max-content;"
class="button button--sm button--md-mob button-pill button-outline button-dropdown w-100 h-100"
type="button"
data-bs-toggle="dropdown"
aria-expanded="false">
Expand All @@ -23,60 +23,53 @@
</ul>
</div>
</div>
<div *ngIf="!isAllowSwitchDecode" class="data flex-grow-1">
<p class="mb-1 font-space-mono">{{value}}</p>
<div *ngIf="!isAllowSwitchDecode" class="data flex-grow-1" style="margin: auto 0px;">
<p class="font-space-mono" [class]="decode ? 'mb-1' : 'mb-0'">{{value}}</p>
<p class="mb-0 font-space-mono" [innerHTML]="decode | highlight_function"></p>
</div>
<div *ngIf="isAllowSwitchDecode" class="data flex-grow-1" [class]="isEvmContract ? 'd-flex align-items-center' : ''">
<div *ngIf="isAllowSwitchDecode" style="margin: auto 0px;" class="data flex-grow-1" [class]="isEvmContract ? 'd-flex align-items-center' : ''">
<img
[src]="'assets/images/icons/token-contract.svg' | imageS3"
width="16px"
height="16px"
alt="contract"
style="margin-right: 2px;"
*ngIf="isEvmContract" />
<a
*ngIf="isLink && type === 'Decode'"
class="text--primary font-space-mono d-inline-block"
[class]="isEvmContract ? 'p-1' : ''"
routerLink="/{{ isEvmContract ? 'evm-contracts' : 'address' }}/{{ data }}">
{{data}}
</a>
<span class="font-space-mono" *ngIf="!isLink || type === 'Hex'">{{data}}</span>
</div>
</div>
<div class="decode-message">
<div *ngIf="isDataField" class="d-flex align-items-start highlight">
<div *ngIf="isDataField" class="d-flex align-items-start highlight" [style]="!isMobile ? 'column-gap: 25px;' : ''">
<div class="flex-grow-1 data-field-msg">
<div *ngIf="type === 'Hex'">
<p class="font-space-mono">{{ data }}</p>
</div>
<div *ngIf="type === 'Decode'">
<div class="data-item" [style]="isMobile ? 'grid-template-columns: minmax(40px, max-content) 1fr' : ''">
<div class="data-item" [style]="isMobile ? 'grid-template-columns: 1fr' : ''">
<ng-container *ngFor="let item of data">
<p class="item-name">{{item?.name}}</p>
<a *ngIf="item?.isLink" class="text--primary font-space-mono" routerLink="/address/{{ item?.decode }}">
{{item?.decode}}
<p class="item-name" style="margin: auto 0px;">{{item?.name}}</p>
<a
*ngIf="item?.isLink"
class="text--primary font-space-mono"
[class]="item?.isEvmContract ? 'd-flex align-items-center' : ''"
routerLink="/{{ item?.isEvmContract ? 'evm-contracts' : 'address' }}/{{ item?.decode }}">
<img
[src]="'assets/images/icons/token-contract.svg' | imageS3"
width="16px"
height="16px"
alt="contract"
style="margin-right: 2px;"
*ngIf="item?.isEvmContract" />
<span>{{item?.decode}}</span>
</a>
<div *ngIf="!item?.isLink" class="font-space-mono">
<div *ngIf="item?.type === 'tuple'" class="d-flex flex-wrap gap-2 align-items-center">
<div *ngFor="let dataDecoded of item?.decode" [class]="dataDecoded?.isEvmContract ? 'd-flex align-items-center' : ''">
<img
[src]="'assets/images/icons/token-contract.svg' | imageS3"
width="16px"
height="16px"
*ngIf="dataDecoded?.isEvmContract" />
<a
*ngIf="dataDecoded?.isLink"
class="text--primary font-space-mono d-inline-block"
[class]="dataDecoded?.isEvmContract ? 'p-1' : ''"
routerLink="/{{ dataDecoded?.isEvmContract ? 'evm-contracts' : 'address' }}/{{ dataDecoded?.name }}">
{{dataDecoded?.name}}
</a>
<p class="font-space-mono" *ngIf="!dataDecoded?.isLink" >{{dataDecoded?.name}}</p>
</div>
</div>
<div *ngIf="item?.type !== 'tuple'">
<p class="font-space-mono">{{item?.decode}}</p>
</div>
<div *ngIf="!item?.isLink">
<p class="font-space-mono">{{item?.decode}}</p>
</div>
</ng-container>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.decode-message {
padding: 2px 0px;
column-gap: 8px;
.data{
font-size: 14px;
Expand All @@ -18,6 +19,9 @@
font-size: 12px;
white-space: nowrap;
margin: 0;
min-width: 32px;
height: 24px;
max-width: max-content;
}
button.button {
background-color: #494C58;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ export class DecodeMessageComponent implements OnInit {
const addresses = [];
for (const item of data) {
if(item?.isLink) addresses.push(item?.decode);
else if(item?.type === 'tuple') {
item?.decode?.split(',')?.forEach((tupleItem) => {
if (tupleItem?.startsWith('0x')) {
addresses.push(tupleItem);
}})
}
}
return _.uniq(addresses.filter(Boolean));
}
Expand All @@ -72,36 +66,12 @@ export class DecodeMessageComponent implements OnInit {
this.contractService.findEvmContractList(addresses).subscribe({
next: (evmList) => {
this.data = Array.isArray(this.decode) && this.decode?.map((item) => {
if (item?.type !== 'tuple') {
const isEvmContract = !!evmList?.evm_smart_contract?.find(contract => contract?.address === item?.decode?.toString()?.toLowerCase());
const isEvmContract = !!evmList?.evm_smart_contract?.find(contract => contract?.address === item?.decode?.toString()?.toLowerCase());

return {
...item,
isEvmContract,
isArray: false,
};
}
if (item?.type === 'tuple') {
const links = item?.decode?.split(',')?.map((tupleItem: string) => {
if (tupleItem?.startsWith('0x')) {
const isEvmContract = !!evmList?.evm_smart_contract?.find(contract => contract?.address === tupleItem?.toString()?.toLowerCase());
return {
isEvmContract,
name: tupleItem,
isLink: true,
};
}
return {
name: tupleItem,
isLink: false,
};
});
return {
...item,
isArray: true,
decode: links,
};
}
return {
...item,
isEvmContract,
};
});
this.detectRef.detectChanges();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,20 @@ export class EvmMessageComponent {
const tupleType = `(${item?.components?.map(this.mappingFunctionName)?.join(', ')}) ${item?.name}`;
const replaceTuple = new RegExp(`\\b${item?.type} ${item?.name}\\b`, 'g');
decoded[0].decode = decoded[0]?.decode?.replace(replaceTuple, tupleType);
}

item?.components?.forEach((tupleParam, tidx) => {
const tupleDecode = {
indexed: tupleParam?.indexed,
name: tupleParam?.name,
type: tupleParam?.type,
isLink: tupleParam?.type === 'address',
decode: paramsDecode.args[idx][tidx]?.toString(),
}
data.push(tupleDecode);
});
return;
}

const param = {
indexed: item?.indexed,
name: item.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div class="event-number">{{ index + 1 }}</div>
<div class="event-content w-100">
<div class="d-flex flex-wrap mb-3">
<div class="col-12 col-lg-1 mb-2 mb-lg-0 text--gray-4 body">
{{ 'Contract' }}
<div class="col-12 col-lg-1 mb-2 mb-lg-0 text--gray-4">
<div class="row-name">Contract</div>
</div>

<div class="col-12 col-lg-11 row">
Expand All @@ -16,8 +16,10 @@
</div>
</div>

<div class="d-flex flex-wrap mb-3">
<div class="col-12 col-lg-1 mb-2 mb-lg-0 text--gray-4 body">Topics</div>
<div class="d-flex flex-wrap mb-2">
<div class="col-12 col-lg-1 mb-2 mb-lg-0 text--gray-4">
<div class="row-name" style="margin-top: 5px;">Topics</div>
</div>
<div class="col-12 col-lg-11 d-flex flex-column gap-2">
<div [featureFlag]="'EnhanceEventLog'" [flagEnabled]="false">
<ng-container *ngFor="let top of eventLog.topics; index as idx">
Expand Down Expand Up @@ -55,8 +57,8 @@
</div>

<div class="d-flex flex-wrap mb-3" *ngIf="eventLog.data">
<div class="col-12 col-lg-1 mb-2 mb-lg-0 text--gray-4 body">
<span style="line-height: 28px">Data</span>
<div class="col-12 col-lg-1 mb-2 mb-lg-0 text--gray-4">
<div class="row-name" style="margin-top: 9px;">Data</div>
</div>
<div class="col-12 col-lg-11">
<div class="highlight font-space-mono" [featureFlag]="'EnhanceEventLog'" [flagEnabled]="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
gap: 8px;
}

.row-name {
font-size: 14px;
line-height: 16px;
font-weight: 400;
margin-top: 2px;
}

.item-topic {
min-height: 40px;
&:last-child {
Expand Down
Loading