Skip to content

Commit c6aaa54

Browse files
authored
Merge pull request #40 from blocknative/develop
Release 0.2.3
2 parents 817efd4 + a46d8fe commit c6aaa54

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bnc-onboard",
3-
"version": "0.2.2",
3+
"version": "0.2.3",
44
"main": "dist/cjs/index.js",
55
"module": "dist/esm/index.js",
66
"files": [

rollup.config.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,17 @@ export default [
3232
babel({ exclude: "node_modules/**" }),
3333
builtins(),
3434
terser()
35-
]
35+
],
36+
moduleContext: id => {
37+
const thisAsWindowForModules = [
38+
"node_modules/intl-messageformat/lib/core.js",
39+
"node_modules/intl-messageformat/lib/compiler.js"
40+
]
41+
42+
if (thisAsWindowForModules.some(id_ => id.trimRight().endsWith(id_))) {
43+
return "window"
44+
}
45+
}
3646
},
3747
{
3848
input: "src/index.js",
@@ -56,6 +66,16 @@ export default [
5666
commonjs(),
5767
babel({ exclude: "node_modules/**" })
5868
],
69+
moduleContext: id => {
70+
const thisAsWindowForModules = [
71+
"node_modules/intl-messageformat/lib/core.js",
72+
"node_modules/intl-messageformat/lib/compiler.js"
73+
]
74+
75+
if (thisAsWindowForModules.some(id_ => id.trimRight().endsWith(id_))) {
76+
return "window"
77+
}
78+
},
5979
output: [
6080
{
6181
dir: "dist/esm",

src/views/WalletSelect.svelte

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,16 @@
3737
3838
$: if ($app.autoSelectWallet) {
3939
const module = deviceWallets.find(m => m.name === $app.autoSelectWallet);
40-
handleWalletSelect(module);
40+
if (module) {
41+
handleWalletSelect(module);
42+
} else {
43+
setModalData();
44+
}
4145
} else {
46+
setModalData();
47+
}
48+
49+
function setModalData() {
4250
if (deviceWallets.find(wallet => wallet.preferred)) {
4351
// if preferred wallets, then split in to preferred and not preferred
4452
primaryWallets = deviceWallets.filter(wallet => wallet.preferred);

0 commit comments

Comments
 (0)