aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/index.umd.ts
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-11-03 04:48:31 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-11-03 05:39:12 +0800
commit5fc2483be776cab90e7ff868b27536a85d6764c9 (patch)
tree1dedb81a97b4c57c763d4f56cb4952d5df4b586f /packages/instant/src/index.umd.ts
parentec83a1d9e735573fe51df7a5854424c0ad4101fb (diff)
downloaddexon-sol-tools-5fc2483be776cab90e7ff868b27536a85d6764c9.tar
dexon-sol-tools-5fc2483be776cab90e7ff868b27536a85d6764c9.tar.gz
dexon-sol-tools-5fc2483be776cab90e7ff868b27536a85d6764c9.tar.bz2
dexon-sol-tools-5fc2483be776cab90e7ff868b27536a85d6764c9.tar.lz
dexon-sol-tools-5fc2483be776cab90e7ff868b27536a85d6764c9.tar.xz
dexon-sol-tools-5fc2483be776cab90e7ff868b27536a85d6764c9.tar.zst
dexon-sol-tools-5fc2483be776cab90e7ff868b27536a85d6764c9.zip
feat(instant): pass in provider through props, fallback to injected provider
Diffstat (limited to 'packages/instant/src/index.umd.ts')
-rw-r--r--packages/instant/src/index.umd.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts
index 806187a16..b269ad741 100644
--- a/packages/instant/src/index.umd.ts
+++ b/packages/instant/src/index.umd.ts
@@ -25,8 +25,12 @@ export const render = (props: ZeroExInstantOverlayProps, selector: string = DEFA
assert.isNumber('props.zIndex', props.zIndex);
}
if (!_.isUndefined(props.affiliateInfo)) {
- assert.isValidaffiliateInfo('props.affiliateInfo', props.affiliateInfo);
+ assert.isValidAffiliateInfo('props.affiliateInfo', props.affiliateInfo);
}
+ if (!_.isUndefined(props.provider)) {
+ assert.isWeb3Provider('props.provider', props.provider);
+ }
+ assert.isString('selector', selector);
const appendToIfExists = document.querySelector(selector);
assert.assert(!_.isNull(appendToIfExists), `Could not find div with selector: ${selector}`);
const appendTo = appendToIfExists as Element;