From 277681185e3d87e936c98d8ba2a365dedf708ee1 Mon Sep 17 00:00:00 2001 From: CM Date: Fri, 20 Oct 2023 18:07:06 +0100 Subject: [PATCH] Progress Establish connection to EOS mainnet successfully Add EOS account via private key Switch to BeetEOS branding Add RAM stake to balances Remove ID from account dropdown and details --- src/components/account-details.vue | 8 - src/components/balances.vue | 6 - src/components/blockchains/ImportKeys.vue | 99 ++------ src/components/header-guest.vue | 2 +- src/components/header-small.vue | 11 +- src/lib/blockchains/BlockchainAPI.js | 4 +- src/lib/blockchains/EOSmainnet.js | 266 +++++++++++++++++++++- src/lib/formatter.js | 4 - 8 files changed, 276 insertions(+), 124 deletions(-) diff --git a/src/components/account-details.vue b/src/components/account-details.vue index 837eda73..847a455b 100644 --- a/src/components/account-details.vue +++ b/src/components/account-details.vue @@ -84,14 +84,6 @@ {{ account.accountName }} - - - {{ t('common.account_details_id_lbl') }} - - - {{ account.accountID }} - - diff --git a/src/components/balances.vue b/src/components/balances.vue index e9ca8f40..88f14fe0 100644 --- a/src/components/balances.vue +++ b/src/components/balances.vue @@ -59,12 +59,6 @@ let accountName = computed(() => { return props.account.accountName; }); - - /* - let accountID = computed(() => { - return props.account.accountID; - }); - */ let blockchain = computed(() => { return props.blockchain; diff --git a/src/components/blockchains/ImportKeys.vue b/src/components/blockchains/ImportKeys.vue index 96bbce02..d3d44c8f 100644 --- a/src/components/blockchains/ImportKeys.vue +++ b/src/components/blockchains/ImportKeys.vue @@ -16,10 +16,7 @@ }); let accountname = ref(""); - let activepk = ref(""); - let ownerpk = ref(""); - let memopk = ref(""); - let includeOwner = ref(0); + let privateKey = ref(""); let accessType = computed(() => { if (!props.chain) { @@ -42,32 +39,31 @@ } async function next() { - let blockchain = getBlockchainAPI(props.chain); - let authorities = {}; + let blockchain = await getBlockchainAPI(props.chain); - if (requiredFields.value.active != null) { - authorities.active = activepk.value; - } - if (requiredFields.value.memo != null) { - authorities.memo = memopk.value; - } - if (includeOwner.value == 1 && requiredFields.value.owner != null) { - authorities.owner = ownerpk.value; + let authorities = {}; + if (requiredFields.value.privateKey != null) { + authorities.privateKey = privateKey.value; } let account; try { - account = await blockchain.verifyAccount(accountname.value, authorities); + account = await blockchain.verifyAccount(accountname.value, authorities.privateKey, props.chain); } catch (error) { console.log(error); ipcRenderer.send("notify", t("common.unverified_account_error")); return; } + if (!account) { + console.log("Account not found"); + return; + } + emitter.emit('accounts_to_import', [{ account: { accountName: accountname.value, - accountID: account.id, + storedAccount: account, chain: props.chain, keys: authorities } @@ -91,53 +87,20 @@

{{ t('common.keys_cta') }}

-