Skip to content

Commit

Permalink
return provider from initProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
rekmarks committed Apr 17, 2020
1 parent 4553876 commit 0469555
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/initProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const MetamaskInpageProvider = require('./MetamaskInpageProvider')
* @param {boolean} opts.shouldSendMetadata - Whether the provider should send page metadata.
* @param {Object} opts.proxyHandler - A proxy handler object. The provider is proxied if present.
* @param {boolean} opts.shouldSet - Whether the provider should be set as window.ethereum
* @returns {MetamaskInpageProvider | Proxy} The initialized provider (whether set or not).
*/
function initProvider ({
connectionStream,
Expand All @@ -33,6 +34,8 @@ function initProvider ({
if (shouldSet) {
setGlobalProvider(provider)
}

return provider
}

/**
Expand Down

0 comments on commit 0469555

Please sign in to comment.