Skip to content

Commit 083b74d

Browse files
authored
Merge pull request #51 from GetScatter/master
FIO Fixes, Account hint fixes, missing explorer fixes
2 parents b48452e + 3087114 commit 083b74d

6 files changed

Lines changed: 28 additions & 27 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bridge",
3-
"version": "1.0.10",
3+
"version": "1.0.11",
44
"private": true,
55
"scripts": {
66
"build": "npm run check && yarn && cross-env NODE_ENV=production BABEL_ENV=prod vue-cli-service build && npm run zip",
@@ -22,7 +22,7 @@
2222
"@walletpack/core": "^1.0.50",
2323
"@walletpack/eosio": "^0.0.61",
2424
"@walletpack/ethereum": "^0.0.59",
25-
"@walletpack/fio": "^0.0.27",
25+
"@walletpack/fio": "^0.0.28",
2626
"@walletpack/tron": "^0.0.62",
2727
"aes-oop": "^1.0.4",
2828
"bip32": "^2.0.4",

src/components/ManageAccounts.vue

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@
2121
</section>
2222
<section class="accounts">
2323
<section class="account" v-for="account in accounts" v-if="search.length || expanded[network.unique()] || enabledAccounts.find(x => x.unique() === account.unique())">
24-
<figure class="account-name">{{account.sendable()}}<span class="authority" v-if="account.authority">@{{account.authority}}</span></figure>
24+
<figure class="account-name" v-if="network.blockchain === 'fio'">
25+
<span v-if="account.fio_address">{{account.fio_address}}</span>
26+
<span v-else>{{account.sendable()}}<span class="authority">@{{account.authority}}</span></span>
27+
28+
</figure>
29+
<figure class="account-name" v-else>
30+
{{account.sendable()}}<span class="authority" v-if="account.authority">@{{account.authority}}</span>
31+
</figure>
32+
2533
<figure class="select-account" :class="{'selected':enabledAccounts.find(x => x.unique() === account.unique())}" @click="select(account, network)">
2634
<i class="fa fa-check"></i>
2735
</figure>
@@ -112,11 +120,18 @@
112120
|| x.authority.toLowerCase().indexOf(this.search) > -1
113121
|| network.name.toLowerCase().indexOf(this.search) > -1;
114122
});
115-
})()
123+
})().reduce((acc,x) => {
124+
if(x.fio_address) {
125+
if(!acc.find(y => y.fio_address === x.fio_address)) acc.push(x);
126+
}
127+
else acc.push(x);
128+
return acc;
129+
}, [])
116130
131+
.sort((a,b) => {
132+
return a.sendable().localeCompare(b.sendable())
133+
})
117134
// .sort((a,b) => {
118-
// return a.sendable().localeCompare(b.sendable())
119-
// }).sort((a,b) => {
120135
// return this.enabledAccounts.find(x => x.unique() === a.unique()) ? -1 : 0;
121136
// })
122137
}

src/components/wallet/Assets.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@
296296
this.loadChart()
297297
});
298298
299-
// TODO: Not showing savings
300299
if(this.savingsEnabled) {
301300
this.scatter.settings.networks.map(network => {
302301
if (network.blockchain === 'eos') this.lockableChains[network.unique()] = true;
302+
if (network.blockchain === 'fio') this.lockableChains[network.unique()] = true;
303303
// this.lockableChains[network.unique()] = PluginRepository.plugin(network.blockchain).hasAccountActions();
304304
})
305305

src/components/wallet/History.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
if(typeof hist.account === 'string') return hist.account.slice(24, -1).split(':')[0];
144144
return hist.account.blockchain();
145145
})();
146-
const explorers = this.scatter.settings.explorers || PluginRepository.defaultExplorers();
146+
const explorers = PluginRepository.defaultExplorers();
147147
const explorer = explorers[blockchain].parsed();
148148
this.openInBrowser(explorer.transaction(hist.txid));
149149
},

src/store/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const getters = {
7272

7373
identity:state => state.scatter.keychain.identities[0],
7474

75-
explorers:state => state.scatter.settings.explorers || PluginRepository.defaultExplorers(),
75+
explorers:state => PluginRepository.defaultExplorers(),
7676
avatars:state => state.scatter.keychain.avatars || {},
7777
friends:state => state.scatter.friends || [],
7878
};

src/views/popouts/AppLogin.vue

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,27 +76,13 @@
7676
this.selectedAccount = this.accounts[0];
7777
7878
if(this.hintAccount){
79-
const plugin = PluginRepository.plugin('eos');
8079
let [account_name, account_permission] = this.hintAccount.split('@');
80+
81+
// Never allowing owner
8182
if(!account_permission || account_permission.trim().toLowerCase() === 'owner') account_permission = 'active';
8283
83-
const accountData = await plugin.accountData(null, this.requestedNetworks[0], account_name);
84-
if(!accountData) this.closer(null);
85-
const keys = accountData.permissions.filter(x => x.perm_name !== 'owner').reduce((acc, x) => {
86-
x.required_auth.keys.map(({key}) => acc.push(key));
87-
return acc;
88-
}, []);
89-
const found = this.scatter.keychain.keypairs.find(x => keys.includes(x.publicKeys.find(k => k.blockchain === 'eos').key));
90-
if(found){
91-
this.selectedAccount = Account.fromJson({
92-
keypairUnique:found.unique(),
93-
networkUnique:this.requestedNetworks[0].unique(),
94-
publicKey:found.publicKeys.find(x => x.blockchain === 'eos').key,
95-
name:account_name,
96-
authority:account_permission,
97-
fromOrigin:this.app.applink
98-
});
99-
}
84+
const exists = this.scatter.keychain.accounts.find(x => x.name === account_name && x.authority === account_permission);
85+
if(exists) this.selectedAccount = exists;
10086
}
10187
},
10288
methods:{

0 commit comments

Comments
 (0)