diff --git a/package.json b/package.json index b9e938f..75cc430 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@walletpack/core": "^1.0.50", "@walletpack/eosio": "^0.0.61", "@walletpack/ethereum": "^0.0.59", - "@walletpack/fio": "^0.0.27", + "@walletpack/fio": "^0.0.28", "@walletpack/tron": "^0.0.62", "aes-oop": "^1.0.4", "bip32": "^2.0.4", diff --git a/src/components/ManageAccounts.vue b/src/components/ManageAccounts.vue index 883badc..7931cb3 100644 --- a/src/components/ManageAccounts.vue +++ b/src/components/ManageAccounts.vue @@ -21,7 +21,15 @@
- + + + @@ -112,11 +120,18 @@ || x.authority.toLowerCase().indexOf(this.search) > -1 || network.name.toLowerCase().indexOf(this.search) > -1; }); - })() + })().reduce((acc,x) => { + if(x.fio_address) { + if(!acc.find(y => y.fio_address === x.fio_address)) acc.push(x); + } + else acc.push(x); + return acc; + }, []) + .sort((a,b) => { + return a.sendable().localeCompare(b.sendable()) + }) // .sort((a,b) => { - // return a.sendable().localeCompare(b.sendable()) - // }).sort((a,b) => { // return this.enabledAccounts.find(x => x.unique() === a.unique()) ? -1 : 0; // }) } diff --git a/src/components/wallet/Assets.vue b/src/components/wallet/Assets.vue index bb287b7..368f7df 100644 --- a/src/components/wallet/Assets.vue +++ b/src/components/wallet/Assets.vue @@ -296,10 +296,10 @@ this.loadChart() }); - // TODO: Not showing savings if(this.savingsEnabled) { this.scatter.settings.networks.map(network => { if (network.blockchain === 'eos') this.lockableChains[network.unique()] = true; + if (network.blockchain === 'fio') this.lockableChains[network.unique()] = true; // this.lockableChains[network.unique()] = PluginRepository.plugin(network.blockchain).hasAccountActions(); }) diff --git a/src/components/wallet/History.vue b/src/components/wallet/History.vue index 7d71865..22a1ab1 100644 --- a/src/components/wallet/History.vue +++ b/src/components/wallet/History.vue @@ -143,7 +143,7 @@ if(typeof hist.account === 'string') return hist.account.slice(24, -1).split(':')[0]; return hist.account.blockchain(); })(); - const explorers = this.scatter.settings.explorers || PluginRepository.defaultExplorers(); + const explorers = PluginRepository.defaultExplorers(); const explorer = explorers[blockchain].parsed(); this.openInBrowser(explorer.transaction(hist.txid)); }, diff --git a/src/store/store.js b/src/store/store.js index 412bf94..73d699b 100644 --- a/src/store/store.js +++ b/src/store/store.js @@ -72,7 +72,7 @@ export const getters = { identity:state => state.scatter.keychain.identities[0], - explorers:state => state.scatter.settings.explorers || PluginRepository.defaultExplorers(), + explorers:state => PluginRepository.defaultExplorers(), avatars:state => state.scatter.keychain.avatars || {}, friends:state => state.scatter.friends || [], }; diff --git a/src/views/popouts/AppLogin.vue b/src/views/popouts/AppLogin.vue index 88da4b0..04b125a 100644 --- a/src/views/popouts/AppLogin.vue +++ b/src/views/popouts/AppLogin.vue @@ -76,27 +76,13 @@ this.selectedAccount = this.accounts[0]; if(this.hintAccount){ - const plugin = PluginRepository.plugin('eos'); let [account_name, account_permission] = this.hintAccount.split('@'); + + // Never allowing owner if(!account_permission || account_permission.trim().toLowerCase() === 'owner') account_permission = 'active'; - const accountData = await plugin.accountData(null, this.requestedNetworks[0], account_name); - if(!accountData) this.closer(null); - const keys = accountData.permissions.filter(x => x.perm_name !== 'owner').reduce((acc, x) => { - x.required_auth.keys.map(({key}) => acc.push(key)); - return acc; - }, []); - const found = this.scatter.keychain.keypairs.find(x => keys.includes(x.publicKeys.find(k => k.blockchain === 'eos').key)); - if(found){ - this.selectedAccount = Account.fromJson({ - keypairUnique:found.unique(), - networkUnique:this.requestedNetworks[0].unique(), - publicKey:found.publicKeys.find(x => x.blockchain === 'eos').key, - name:account_name, - authority:account_permission, - fromOrigin:this.app.applink - }); - } + const exists = this.scatter.keychain.accounts.find(x => x.name === account_name && x.authority === account_permission); + if(exists) this.selectedAccount = exists; } }, methods:{