fix: handle the case where account is an object

This commit is contained in:
Anthony Laibe 2019-02-26 13:46:49 +00:00
parent 7d5935dc0b
commit 24a6a4701f

View File

@ -18,7 +18,8 @@ class Provider {
this.nonceCache = {};
this.events.setCommandHandler("blockchain:provider:contract:accounts:get", cb => {
cb(this.accounts);
const accounts = this.accounts.map(a => a.address || a);
cb(accounts);
});
}