From 9b34b0bc30efa4479b0dd597955bf829247f7724 Mon Sep 17 00:00:00 2001 From: Dawid Sowa Date: Wed, 12 Jun 2024 14:37:14 +0200 Subject: [PATCH] feat: add TX ignore --- packages/common/src/index.ts | 1 + packages/connect-button/.storybook/preview.js | 4 +- packages/connect-button/README.md | 4 +- packages/connect-button/package.json | 3 +- .../src/assets/icon-ignored.svg | 10 + .../src/components/card/card.stories.ts | 10 +- .../src/components/card/card.ts | 10 +- .../src/components/card/request-card.ts | 70 ++++- .../src/components/card/request-cards.ts | 9 - .../src/components/pages/requests.ts | 9 - packages/dapp-toolkit/package.json | 5 +- .../connect-button/connect-button.module.ts | 48 +++- .../src/modules/connect-button/subjects.ts | 1 + .../request-items/request-item.module.ts | 9 +- .../modules/wallet-request/wallet-request.ts | 256 ++++++++++-------- 15 files changed, 280 insertions(+), 169 deletions(-) create mode 100644 packages/connect-button/src/assets/icon-ignored.svg diff --git a/packages/common/src/index.ts b/packages/common/src/index.ts index 9b24e73b..17b89fa3 100644 --- a/packages/common/src/index.ts +++ b/packages/common/src/index.ts @@ -32,6 +32,7 @@ export const RequestStatus = { success: 'success', fail: 'fail', cancelled: 'cancelled', + ignored: 'ignored', } as const export const RequestItemType = { diff --git a/packages/connect-button/.storybook/preview.js b/packages/connect-button/.storybook/preview.js index 7fbc6030..79106bd5 100644 --- a/packages/connect-button/.storybook/preview.js +++ b/packages/connect-button/.storybook/preview.js @@ -10,9 +10,7 @@ export const parameters = { .replaceAll(':host', '.storybook-wrapper') const theme = themeCSS .toString() - .replace(":host([mode='dark'])", '.storybook-wrapper[mode=dark]') - .replace(":host([mode='light'])", '.storybook-wrapper[mode=light]') - .replaceAll(':host', '.storybook-wrapper') + .replaceAll(/(?::host)\(([a-z=\[\]-]+)\)/g, '.storybook-wrapper$1') return html`