Skip to content

Commit

Permalink
Merge pull request #240 from MickWang/master
Browse files Browse the repository at this point in the history
update ledger connector
  • Loading branch information
MickWang authored Jul 7, 2020
2 parents 83f01a2 + 715ce75 commit 2fc42dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/renderer/components/Common/SelectWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ export default {
this.walletType = e.target.value;
if (e.target.value === "ledgerWallet") {
this.$store.dispatch("getLedgerStatus");
}
} else {
this.$store.dispatch('stopGetLedgerStatus')
}
this.$emit("walletSelected", {
walletType: this.walletType,
wallet: null
Expand Down
7 changes: 4 additions & 3 deletions src/renderer/store/modules/LedgerConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ function getDevice(commit, state) {
}

function getLedgerPublicKey(commit, state) {
if (state.publicKey) {
return;
}
// 这里如果去掉,再SelectWallet组件里,切换类型后不再重新获取ledger地址,会产生bug。
// if (state.publicKey) {
// return;
// }
getPublicKey().then(res => {
console.log('pk info: ' + res);
commit('UPDATE_LEDGER_PUBLICKEY', { publicKey: res })
Expand Down

0 comments on commit 2fc42dc

Please sign in to comment.