Skip to content

Commit

Permalink
chore: show actual relay mesage instead of declined. Improve snackbar (
Browse files Browse the repository at this point in the history
  • Loading branch information
tomiir authored Nov 6, 2024
1 parent 1e29cc5 commit 05feaed
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .changeset/twelve-pianos-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@reown/appkit-scaffold-ui': patch
'@apps/laboratory': patch
'@reown/appkit-ui': patch
'@apps/demo': patch
'@apps/gallery': patch
'@reown/appkit-adapter-ethers': patch
'@reown/appkit-adapter-ethers5': patch
'@reown/appkit-adapter-polkadot': patch
'@reown/appkit-adapter-solana': patch
'@reown/appkit-adapter-wagmi': patch
'@reown/appkit': patch
'@reown/appkit-utils': patch
'@reown/appkit-cdn': patch
'@reown/appkit-common': patch
'@reown/appkit-core': patch
'@reown/appkit-experimental': patch
'@reown/appkit-polyfills': patch
'@reown/appkit-siwe': patch
'@reown/appkit-siwx': patch
'@reown/appkit-wallet': patch
---

Improves SnackBar styles and routes proper relay messages to it on wc-connecting-view
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ export class W3mConnectingWcView extends LitElement {
})
ConnectionController.setWcError(true)
if (CoreHelperUtil.isAllowedRetry(this.lastRetry)) {
SnackController.showError('Declined')
SnackController.showError((error as BaseError).message ?? 'Declined')
this.lastRetry = Date.now()
this.initializeConnection(true)
} else {
SnackController.showError((error as BaseError).message ?? 'Connection error')
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions packages/ui/src/composites/wui-snackbar/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ import { css } from 'lit'
export default css`
:host {
display: flex;
column-gap: var(--wui-spacing-xs);
column-gap: var(--wui-spacing-s);
align-items: center;
padding: var(--wui-spacing-xs) var(--wui-spacing-m) var(--wui-spacing-xs) var(--wui-spacing-xs);
border-radius: var(--wui-border-radius-3xl);
border-radius: var(--wui-border-radius-s);
border: 1px solid var(--wui-color-gray-glass-005);
box-sizing: border-box;
max-height: 40px;
background-color: var(--wui-color-bg-175);
box-shadow:
0px 14px 64px -4px rgba(0, 0, 0, 0.15),
0px 8px 22px -6px rgba(0, 0, 0, 0.15);
max-width: 300px;
}
:host wui-loading-spinner {
Expand Down

0 comments on commit 05feaed

Please sign in to comment.