@@ -56,10 +65,33 @@ export class WuiOnRampActivityItem extends LitElement {
}
// -- Private ------------------------------------------- //
+ private async fetchTokenImage() {
+ await ApiController._fetchTokenImage(this.purchaseCurrency)
+ }
+ private statusIconTemplate() {
+ if (this.inProgress) {
+ return null
+ }
+
+ return this.completed ? this.boughtIconTemplate() : this.errorIconTemplate()
+ }
+
+ private errorIconTemplate() {
+ return html``
+ }
+
private imageTemplate() {
+ const icon = this.icon || `https://avatar.vercel.sh/andrew.svg?size=50&text=${this.symbol}`
+
return html`
-
- ${this.completed ? null : this.boughtIconTemplate()}
+
`
}
@@ -70,7 +102,6 @@ export class WuiOnRampActivityItem extends LitElement {
backgroundColor="success-100"
background="opaque"
icon="arrowBottom"
- ?border=${true}
borderColor="wui-color-bg-125"
>`
}
diff --git a/packages/ui/src/composites/wui-transaction-list-item/index.ts b/packages/ui/src/composites/wui-transaction-list-item/index.ts
index f5d0387738..13b4c7279b 100644
--- a/packages/ui/src/composites/wui-transaction-list-item/index.ts
+++ b/packages/ui/src/composites/wui-transaction-list-item/index.ts
@@ -28,11 +28,11 @@ export class WuiTransactionListItem extends LitElement {
@property({ type: Array }) public images: TransactionImage[] = []
- @property() public price: TransactionImage[] = []
+ @property({ type: Array }) public price: TransactionImage[] = []
- @property() public amount: TransactionImage[] = []
+ @property({ type: Array }) public amount: TransactionImage[] = []
- @property() public symbol: TransactionImage[] = []
+ @property({ type: Array }) public symbol: TransactionImage[] = []
// -- Render -------------------------------------------- //
public override render() {
diff --git a/packages/ui/src/composites/wui-transaction-visual/index.ts b/packages/ui/src/composites/wui-transaction-visual/index.ts
index 750f77616e..00dbf5b94e 100644
--- a/packages/ui/src/composites/wui-transaction-visual/index.ts
+++ b/packages/ui/src/composites/wui-transaction-visual/index.ts
@@ -50,7 +50,6 @@ export class WuiTransactionVisual extends LitElement {
const [firstImage, secondImage] = this.images
const firstImageType = firstImage?.type
const haveTwoImages = this.images.length === 2
-
if (haveTwoImages && (firstImage?.url || secondImage?.url)) {
return html`
${firstImage?.url
diff --git a/packages/ui/src/utils/TransactionUtil.ts b/packages/ui/src/utils/TransactionUtil.ts
index cc415d47d9..057d1cfa73 100644
--- a/packages/ui/src/utils/TransactionUtil.ts
+++ b/packages/ui/src/utils/TransactionUtil.ts
@@ -1,5 +1,5 @@
import { DateUtil } from '@web3modal/common'
-import type { TransactionTransfer, Transaction } from '@web3modal/common'
+import type { TransactionTransfer, Transaction, TransactionImage } from '@web3modal/common'
import type { TransactionType } from './TypeUtil.js'
import { UiHelperUtil } from './UiHelperUtil.js'
@@ -26,7 +26,7 @@ export const TransactionUtil = {
return groupTitle
},
- getTransactionImages(transfers: TransactionTransfer[]) {
+ getTransactionImages(transfers: TransactionTransfer[]): TransactionImage[] {
const [transfer, secondTransfer] = transfers
const isAllNFT = Boolean(transfer) && transfers?.every(item => Boolean(item.nft_info))
const haveMultipleTransfers = transfers?.length > 1
@@ -43,7 +43,7 @@ export const TransactionUtil = {
return [this.getTransactionImage(transfer)]
},
- getTransactionImage(transfer?: TransactionTransfer) {
+ getTransactionImage(transfer?: TransactionTransfer): TransactionImage {
return {
type: TransactionUtil.getTransactionTransferTokenType(transfer),
url: TransactionUtil.getTransactionImageURL(transfer)
@@ -51,7 +51,7 @@ export const TransactionUtil = {
},
getTransactionImageURL(transfer: TransactionTransfer | undefined) {
- let imageURL = null
+ let imageURL = undefined
const isNFT = Boolean(transfer?.nft_info)
const isFungible = Boolean(transfer?.fungible_info)
@@ -64,14 +64,14 @@ export const TransactionUtil = {
return imageURL
},
- getTransactionTransferTokenType(transfer?: TransactionTransfer) {
+ getTransactionTransferTokenType(transfer?: TransactionTransfer): 'FUNGIBLE' | 'NFT' | undefined {
if (transfer?.fungible_info) {
return 'FUNGIBLE'
} else if (transfer?.nft_info) {
return 'NFT'
}
- return null
+ return undefined
},
getTransactionDescriptions(transaction: Transaction) {
diff --git a/packages/ui/src/utils/TypeUtil.ts b/packages/ui/src/utils/TypeUtil.ts
index a44b911eb0..7c0180d882 100644
--- a/packages/ui/src/utils/TypeUtil.ts
+++ b/packages/ui/src/utils/TypeUtil.ts
@@ -51,7 +51,7 @@ export type SpacingType =
| 'xxl'
| 'xxs'
-export type BorderRadiusType = Exclude
+export type BorderRadiusType = Exclude | 'xs'
export type FlexDirectionType = 'column-reverse' | 'column' | 'row-reverse' | 'row'
diff --git a/packages/wagmi/CHANGELOG.md b/packages/wagmi/CHANGELOG.md
index e3aa43a878..d05dfe150b 100644
--- a/packages/wagmi/CHANGELOG.md
+++ b/packages/wagmi/CHANGELOG.md
@@ -1,5 +1,19 @@
# @web3modal/wagmi
+## 4.0.4
+
+### Patch Changes
+
+- Fix theming issue for email
+
+- Updated dependencies []:
+ - @web3modal/scaffold@4.0.4
+ - @web3modal/polyfills@4.0.4
+ - @web3modal/scaffold-react@4.0.4
+ - @web3modal/scaffold-utils@4.0.4
+ - @web3modal/scaffold-vue@4.0.4
+ - @web3modal/siwe@4.0.4
+
## 4.0.3
### Patch Changes
diff --git a/packages/wagmi/package.json b/packages/wagmi/package.json
index 1a003b4cd1..c658c504df 100644
--- a/packages/wagmi/package.json
+++ b/packages/wagmi/package.json
@@ -1,6 +1,6 @@
{
"name": "@web3modal/wagmi",
- "version": "4.0.3",
+ "version": "4.0.4",
"type": "module",
"main": "./dist/esm/exports/index.js",
"types": "./dist/types/exports/index.d.ts",
@@ -51,11 +51,11 @@
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
- "@web3modal/polyfills": "4.0.3",
- "@web3modal/scaffold": "4.0.3",
- "@web3modal/scaffold-react": "4.0.3",
- "@web3modal/scaffold-utils": "4.0.3",
- "@web3modal/scaffold-vue": "4.0.3"
+ "@web3modal/polyfills": "4.0.4",
+ "@web3modal/scaffold": "4.0.4",
+ "@web3modal/scaffold-react": "4.0.4",
+ "@web3modal/scaffold-utils": "4.0.4",
+ "@web3modal/scaffold-vue": "4.0.4"
},
"devDependencies": {
"@wagmi/connectors": "4.1.4",
@@ -90,7 +90,7 @@
}
},
"optionalDependencies": {
- "@web3modal/siwe": "4.0.3",
+ "@web3modal/siwe": "4.0.4",
"react": ">=17",
"react-dom": ">=17",
"vue": ">=3"
diff --git a/packages/wagmi/src/client.ts b/packages/wagmi/src/client.ts
index e1a5319d7d..ba1c90d303 100644
--- a/packages/wagmi/src/client.ts
+++ b/packages/wagmi/src/client.ts
@@ -384,9 +384,14 @@ export class Web3Modal extends Web3ModalScaffold {
) {
if (typeof window !== 'undefined' && connector) {
super.setLoading(true)
+
const provider = (await connector.getProvider()) as W3mFrameProvider
const isLoginEmailUsed = provider.getLoginEmailUsed()
super.setLoading(isLoginEmailUsed)
+ if (isLoginEmailUsed) {
+ this.setIsConnected(false)
+ }
+
provider.onRpcRequest(request => {
if (!W3mFrameHelpers.checkIfRequestIsAllowed(request)) {
super.open({ view: 'ApproveTransaction' })
@@ -396,6 +401,7 @@ export class Web3Modal extends Web3ModalScaffold {
super.close()
})
provider.onIsConnected(() => {
+ this.setIsConnected(true)
super.setLoading(false)
})
}
diff --git a/packages/wallet/CHANGELOG.md b/packages/wallet/CHANGELOG.md
index 5d61bc2e13..2fc9beec1b 100644
--- a/packages/wallet/CHANGELOG.md
+++ b/packages/wallet/CHANGELOG.md
@@ -1,5 +1,11 @@
# @web3modal/wallet
+## 4.0.4
+
+### Patch Changes
+
+- Fix theming issue for email
+
## 4.0.3
### Patch Changes
diff --git a/packages/wallet/package.json b/packages/wallet/package.json
index c72c05b5ed..bdc8e6d92f 100644
--- a/packages/wallet/package.json
+++ b/packages/wallet/package.json
@@ -1,6 +1,6 @@
{
"name": "@web3modal/wallet",
- "version": "4.0.3",
+ "version": "4.0.4",
"type": "module",
"main": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",