@web3-onboard/common
Advanced tools
Comparing version 2.3.1 to 2.3.2-alpha.1
@@ -285,2 +285,8 @@ import type { ConnectionInfo } from 'ethers/lib/utils'; | ||
/** | ||
* An optional array of tokens to be available to the dapp in the | ||
* app state object per wallet within the wallet account and displayed | ||
* in Account Center (if enabled) | ||
*/ | ||
secondaryTokens?: SecondaryTokens[]; | ||
/** | ||
* The color used to represent the chain and | ||
@@ -295,2 +301,18 @@ * will be used as a background for the icon | ||
} | ||
export interface SecondaryTokens { | ||
/** | ||
* Required - The onchain address of the token associated | ||
* with the chain it is entered under | ||
*/ | ||
address: string; | ||
/** | ||
* Required - The symbol of the token i.e. USDC, ETH, 1INCH | ||
*/ | ||
name: TokenSymbol; | ||
/** | ||
* An optional svg or url string for the icon of the token. | ||
* If an svg is used ensure the height/width is set to 100% | ||
*/ | ||
icon?: string; | ||
} | ||
export type ChainWithDecimalId = Omit<Chain, 'id'> & { | ||
@@ -297,0 +319,0 @@ id: DecimalChainId; |
@@ -21,2 +21,7 @@ import Joi from 'joi'; | ||
}); | ||
const secondaryTokenValidation = Joi.object({ | ||
name: Joi.string().required(), | ||
address: Joi.string().required(), | ||
icon: Joi.string().optional() | ||
}); | ||
export const chainValidation = Joi.object({ | ||
@@ -28,2 +33,3 @@ namespace: chainNamespaceValidation, | ||
token: Joi.string(), | ||
secondaryTokens: Joi.array().items(secondaryTokenValidation).optional(), | ||
icon: Joi.string(), | ||
@@ -30,0 +36,0 @@ color: Joi.string(), |
{ | ||
"name": "@web3-onboard/common", | ||
"version": "2.3.1", | ||
"version": "2.3.2-alpha.1", | ||
"description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21092
544
1