Skip to content

Commit d93a9f5

Browse files
author
Aleksandar Cakalic
committed
Merge branch 'refs/heads/feat/argent-one-button-connector' into beta
2 parents 1f59f8d + 093f637 commit d93a9f5

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,11 @@ export const connect = async ({
212212
modal.$destroy()
213213
}
214214
} catch (error) {
215-
modal.$set({ layout: Layout.failure })
215+
if (
216+
[Layout.connecting, Layout.qrCode].includes(modal.getLayout())
217+
) {
218+
modal.$set({ layout: Layout.failure })
219+
}
216220
reject(error)
217221
}
218222
},

src/modal/Modal.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ interface ModalProps {
2222
interface ModalInstance extends SvelteComponent {
2323
$set(props: Partial<ModalProps>): void
2424
$destroy(): void
25+
getLayout: () => Layout
2526
}

src/modal/Modal.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
function setLayout(newLayout: Layout): void {
2828
layout = newLayout
2929
}
30+
export function getLayout() {
31+
return layout
32+
}
3033
3134
export let modalWallets: ModalWallet[] = []
3235
export let selectedWallet: ModalWallet | null = null

0 commit comments

Comments
 (0)