Skip to content

Commit

Permalink
Merge pull request #40 from blocknative/develop
Browse files Browse the repository at this point in the history
Release 0.2.3
  • Loading branch information
lnbc1QWFyb24 authored Oct 28, 2019
2 parents 817efd4 + a46d8fe commit c6aaa54
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bnc-onboard",
"version": "0.2.2",
"version": "0.2.3",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"files": [
Expand Down
22 changes: 21 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,17 @@ export default [
babel({ exclude: "node_modules/**" }),
builtins(),
terser()
]
],
moduleContext: id => {
const thisAsWindowForModules = [
"node_modules/intl-messageformat/lib/core.js",
"node_modules/intl-messageformat/lib/compiler.js"
]

if (thisAsWindowForModules.some(id_ => id.trimRight().endsWith(id_))) {
return "window"
}
}
},
{
input: "src/index.js",
Expand All @@ -56,6 +66,16 @@ export default [
commonjs(),
babel({ exclude: "node_modules/**" })
],
moduleContext: id => {
const thisAsWindowForModules = [
"node_modules/intl-messageformat/lib/core.js",
"node_modules/intl-messageformat/lib/compiler.js"
]

if (thisAsWindowForModules.some(id_ => id.trimRight().endsWith(id_))) {
return "window"
}
},
output: [
{
dir: "dist/esm",
Expand Down
10 changes: 9 additions & 1 deletion src/views/WalletSelect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,16 @@
$: if ($app.autoSelectWallet) {
const module = deviceWallets.find(m => m.name === $app.autoSelectWallet);
handleWalletSelect(module);
if (module) {
handleWalletSelect(module);
} else {
setModalData();
}
} else {
setModalData();
}
function setModalData() {
if (deviceWallets.find(wallet => wallet.preferred)) {
// if preferred wallets, then split in to preferred and not preferred
primaryWallets = deviceWallets.filter(wallet => wallet.preferred);
Expand Down

0 comments on commit c6aaa54

Please sign in to comment.