Skip to content

Commit

Permalink
fix(wallet-iframe): disconnect button
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Apr 26, 2021
1 parent 1ed9284 commit 59014bd
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions examples/browser/wallet-iframe/src/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,10 @@
return await prob(attemps)
},
disconnect () {
const { clients: aepps } = this.client.getClients()
const aepp = Array.from(aepps.values())[0]
aepp.sendMessage({
method: METHODS.closeConnection,
params: { reason: 'bye' },
}, true)
aepp.disconnect()
Object.values(this.client.rpcClients).forEach(client => {
client.sendMessage({ method: METHODS.closeConnection }, true)
client.disconnect()
})
},
async switchAccount () {
const secondAcc = this.client.addresses().find(a => a !== this.publicKey)
Expand Down

0 comments on commit 59014bd

Please sign in to comment.