diff --git a/src/app/dashboard/send/send.component.html b/src/app/dashboard/send/send.component.html
index 1554ea2e..c6d6d222 100644
--- a/src/app/dashboard/send/send.component.html
+++ b/src/app/dashboard/send/send.component.html
@@ -127,11 +127,11 @@ {{contact.name}}
-
+
diff --git a/src/app/dashboard/wallet/wallet.component.html b/src/app/dashboard/wallet/wallet.component.html
index 95647f55..35fed050 100644
--- a/src/app/dashboard/wallet/wallet.component.html
+++ b/src/app/dashboard/wallet/wallet.component.html
@@ -177,7 +177,7 @@
diff --git a/src/app/landing/landing.component.ts b/src/app/landing/landing.component.ts
index 30a68211..05ebeb71 100644
--- a/src/app/landing/landing.component.ts
+++ b/src/app/landing/landing.component.ts
@@ -403,7 +403,17 @@ export class LandingComponent implements OnInit, OnDestroy {
}
makePayload() {
- if (PublicKey.fromString(this.ownerpub).validate() && PublicKey.fromString(this.activepub).validate()) {
+ let ownerKeyValid = false;
+ let activeKeyValid = false;
+ try {
+ const ownerKey = PublicKey.fromString(this.ownerpub);
+ const activeKey = PublicKey.fromString(this.activepub);
+ ownerKeyValid = ownerKey.toLegacyString() !== "";
+ activeKeyValid = activeKey.toLegacyString() !== "";
+ } catch (e) {
+ console.error('Error validating public key:', e);
+ }
+ if (ownerKeyValid && activeKeyValid) {
console.log('Generating account payload');
this.newAccountPayload = btoa(JSON.stringify({
n: this.accountname.toLowerCase(),
diff --git a/src/app/services/eosio/eosjs2.service.ts b/src/app/services/eosio/eosjs2.service.ts
index a37d8413..7537b828 100644
--- a/src/app/services/eosio/eosjs2.service.ts
+++ b/src/app/services/eosio/eosjs2.service.ts
@@ -392,9 +392,18 @@ export class Eosjs2Service {
async loadPublicKey(pubkey: PublicKey): Promise {
return new Promise(async (resolve, reject2) => {
- if (pubkey.validate()) {
+ let isValid = false;
+ let legacyKey = '';
+ try {
+ legacyKey = pubkey.toLegacyString();
+ isValid = legacyKey !== "";
+ } catch (e) {
+ console.error('Error while validating public key with toLegacyString:', e);
+ isValid = false;
+ }
+ if (isValid) {
const tempAccData = [];
- const account_names = await this.getKeyAccountsMulti(pubkey.toString());
+ const account_names = await this.getKeyAccountsMulti(legacyKey);
console.log(account_names);
if (account_names.length > 0) {
const promiseQueue = [];
@@ -421,7 +430,7 @@ export class Eosjs2Service {
.then((results: any[]) => {
resolve({
foundAccounts: results,
- publicKey: pubkey.toString(),
+ publicKey: legacyKey,
});
})
.catch(() => {
|