Skip to content

Commit

Permalink
Merge pull request #3435 from aura-nw/fix/sere/crash-share-comp
Browse files Browse the repository at this point in the history
fix: crash app when reading undefined var
  • Loading branch information
TranTrungTien committed May 28, 2024
2 parents 79d54af + 68e479d commit 0496185
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/app/core/utils/common/address-converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function transferAddress(prefix: string, address: string) {
};
}

if (address.startsWith(EWalletType.EVM)) {
if (address?.startsWith(EWalletType.EVM)) {
return {
accountEvmAddress: address?.toLowerCase(),
accountAddress: convertEvmAddressToBech32Address(prefix, address),
Expand All @@ -122,3 +122,4 @@ export function getEvmChecksumAddress(address: string) {
return address;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export class EvmPopupShareComponent implements OnInit {
'';
}

closeDialog(isConfirm = false) {
this.dialogRef.close(isConfirm);
closeDialog() {
this.dialogRef.close(true);
}

executeShareLink(mode) {
Expand Down Expand Up @@ -73,3 +73,4 @@ export class EvmPopupShareComponent implements OnInit {
document.getElementById(item).classList.remove('icon--multi-color');
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export class PopupShareComponent implements OnInit {
'';
}

closeDialog(isConfirm = false) {
this.dialogRef.close(isConfirm);
closeDialog() {
this.dialogRef.close(true);
}

executeShareLink(mode) {
Expand Down Expand Up @@ -73,3 +73,4 @@ export class PopupShareComponent implements OnInit {
document.getElementById(item).classList.remove('icon--multi-color');
}
}

0 comments on commit 0496185

Please sign in to comment.