Skip to content

Commit

Permalink
fix: provider api (#1003)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
yqrashawn and mergify[bot] authored May 10, 2022
1 parent 39c9917 commit efdf488
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .yarn/versions/60317b72.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
releases:
"@fluent-wallet/provider-api": patch
helios-inpage: patch

declined:
- browser-extension
- "@fluent-wallet/use-rpc"
5 changes: 4 additions & 1 deletion packages/ui/provider-api/Provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Provider extends SafeEventEmitter {
// DEPRECATED
'networkChanged',
'chainIdChanged',
'data',

'connect',
'disconnect',
Expand Down Expand Up @@ -163,7 +164,9 @@ class Provider extends SafeEventEmitter {
)
if (typeof callback !== 'function')
throw new Error('Invalid callback, not a function')
this.request(payload).catch(callback)
requestFactory(this.#send, payload)
.then(res => callback(null, res))
.catch(callback)
}

// DEPRECATED
Expand Down

0 comments on commit efdf488

Please sign in to comment.