Skip to content

Commit

Permalink
fix: crash app when reading undefined var
Browse files Browse the repository at this point in the history
  • Loading branch information
TranTrungTien committed May 28, 2024
1 parent 79d54af commit 68e479d
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 68e479d

Please sign in to comment.