Skip to content

Commit

Permalink
Progress
Browse files Browse the repository at this point in the history
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
  • Loading branch information
grctest committed Oct 20, 2023
1 parent 6d93c5d commit 2776811
Show file tree
Hide file tree
Showing 8 changed files with 276 additions and 124 deletions.
8 changes: 0 additions & 8 deletions src/components/account-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,6 @@
{{ account.accountName }}
</ui-item-last-content>
</ui-item>
<ui-item :key="account.accountID">
<ui-item-text-content v-if="account.accountName != account.accountID">
{{ t('common.account_details_id_lbl') }}
</ui-item-text-content>
<ui-item-last-content>
{{ account.accountID }}
</ui-item-last-content>
</ui-item>
</ui-list>
</ui-card>
</div>
Expand Down
6 changes: 0 additions & 6 deletions src/components/balances.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@
let accountName = computed(() => {
return props.account.accountName;
});
/*
let accountID = computed(() => {
return props.account.accountID;
});
*/
let blockchain = computed(() => {
return props.blockchain;
Expand Down
99 changes: 17 additions & 82 deletions src/components/blockchains/ImportKeys.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
}
Expand All @@ -91,53 +87,20 @@
<p class="my-3 font-weight-normal">
{{ t('common.keys_cta') }}
</p>
<template v-if="requiredFields.active !== null">

<template v-if="requiredFields.privateKey !== null">
<p class="mb-2 font-weight-bold">
{{ t(accessType == 'account' ? 'common.active_authority' : 'common.public_authority') }}
</p>
<input
id="inputActive"
v-model="activepk"
v-model="privateKey"
type="password"
class="form-control mb-3 small"
:placeholder="t(accessType == 'account' ? 'common.active_authority_placeholder' : 'common.public_authority_placeholder')"
required
>
</template>
<template v-if="requiredFields.memo !== null">
<p class="mb-2 font-weight-bold">
{{ t('common.memo_authority') }}
</p>
<input
id="inputMemo"
v-model="memopk"
type="password"
class="form-control mb-3 small"
:placeholder="t('common.memo_authority_placeholder')"
required
>
</template>
<template v-if="requiredFields.owner !== null">
<ui-form-field>
<ui-checkbox
v-model="includeOwner"
value="1"
unchecked-value="0"
input-id="incOwnerCB"
/>
<label>{{ t('common.include_owner_check') }}</label>
</ui-form-field>
<div v-if="includeOwner == 1">
<input
id="inputOwner"
v-model="ownerpk"
type="password"
class="form-control mb-3 small"
:placeholder="t('common.owner_authority_placeholder')"
required
>
</div>
</template>

<ui-grid>
<ui-grid-cell columns="12">
Expand All @@ -149,37 +112,9 @@
{{ t('common.back_btn') }}
</ui-button>

<span v-if="includeOwner == 1 && requiredFields.memo != null && requiredFields.active != null">
<ui-button
v-if="
accountname !== ''
&& ownerpk !== ''
&& memopk !== ''
&& activepk !== ''
"
raised
class="step_btn"
type="submit"
@click="next"
>
{{ t('common.next_btn') }}
</ui-button>
<ui-button
v-else
disabled
class="step_btn"
type="submit"
>
{{ t('common.next_btn') }}
</ui-button>
</span>
<span v-else-if="includeOwner == 0 && requiredFields.memo != null && requiredFields.active != null">
<span v-if="requiredFields.privateKey != null">
<ui-button
v-if="
accountname !== ''
&& memopk !== ''
&& activepk !== ''
"
v-if="accountname !== '' && privateKey !== ''"
raised
class="step_btn"
type="submit"
Expand Down
2 changes: 1 addition & 1 deletion src/components/header-guest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
height="150"
>
<div class="beet-typo">
Beet
BeetEOS
</div>
<h3 class="h3">
{{ t("common.welcome" ) }}
Expand Down
11 changes: 1 addition & 10 deletions src/components/header-small.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@
onMounted(() => {
logger.debug("Small Header mounted");
});
/*
<ui-grid-cell
class="smallHeader"
columns="6"
>
<langSelect location="small" />
</ui-grid-cell>
*/
</script>

<template>
Expand All @@ -42,7 +33,7 @@
alt
>
<h4 class="h4 beet-typo-small">
Beet
BeetEOS
</h4>
</ui-grid-cell>
</ui-grid>
Expand Down
4 changes: 1 addition & 3 deletions src/lib/blockchains/BlockchainAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,7 @@ export default class BlockchainAPI {

getSignUpInput() {
return {
active: true,
memo: true,
owner: false
privateKey: true
}
}

Expand Down
Loading

0 comments on commit 2776811

Please sign in to comment.