Skip to content

Commit

Permalink
Add sendAsync for Aragon wrapper (#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
floating authored Jan 24, 2022
1 parent a5c226e commit d5f42db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ class TransactionRequest extends React.Component {
<span className='monitorSub'>{'ON'} </span>
<span className='monitorSub monitorSubHighlight'>
{}
{this.store('main.networks', this.chain.type, parseInt(req.payload.chainId), 'name')}
{this.store('main.networks', this.chain.type, this.chain.id, 'name')}
</span>
</div>
) : (
Expand Down
7 changes: 7 additions & 0 deletions main/provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,13 @@ class Provider extends EventEmitter {
return target
}

sendAsync (payload: RPCRequestPayload, cb: Callback<RPCResponsePayload>) {
this.send(payload, res => {
if (res.error) return cb(new Error(`sendAsync Error: ${res.error}`))
cb(null, res)
})
}

send (payload: RPCRequestPayload, res: RPCRequestCallback = () => {}) {
const method = payload.method || ''
const targetChain = this.parseTargetChain(payload)
Expand Down

0 comments on commit d5f42db

Please sign in to comment.