@web3-onboard/fortmatic
Advanced tools
Comparing version 2.0.19 to 2.1.0-alpha.2
@@ -1,3 +0,3 @@ | ||
import type { WalletInit, APIKey } from '@web3-onboard/common'; | ||
import { WalletInit, APIKey } from '@web3-onboard/common'; | ||
declare function fortmatic(options: APIKey): WalletInit; | ||
export default fortmatic; |
@@ -0,1 +1,2 @@ | ||
import { weiToEth } from '@web3-onboard/common'; | ||
function fortmatic(options) { | ||
@@ -7,3 +8,3 @@ const { apiKey } = options; | ||
getIcon: async () => (await import('./icon.js')).default, | ||
getInterface: async ({ EventEmitter, BigNumber, chains }) => { | ||
getInterface: async ({ EventEmitter, chains }) => { | ||
const { default: Fortmatic } = await import('fortmatic'); | ||
@@ -22,3 +23,3 @@ const { createEIP1193Provider, ProviderRpcErrorCode, ProviderRpcError } = await import('@web3-onboard/common'); | ||
try { | ||
const accounts = await instance.user.login(); | ||
const accounts = (await instance.user.login()); | ||
return accounts; | ||
@@ -40,7 +41,3 @@ } | ||
const [balance] = await instance.user.getBalances(); | ||
return balance | ||
? BigNumber.from(balance.crypto_amount) | ||
.mul('1000000000000000000') | ||
.toString() | ||
: '0'; | ||
return balance ? weiToEth(balance.crypto_amount) : '0'; | ||
}, | ||
@@ -47,0 +44,0 @@ wallet_switchEthereumChain: async ({ params }) => { |
{ | ||
"name": "@web3-onboard/fortmatic", | ||
"version": "2.0.19", | ||
"version": "2.1.0-alpha.2", | ||
"description": "Fortmatic wallet module for connecting to Web3-Onboard. 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.", | ||
@@ -58,8 +58,8 @@ "keywords": [ | ||
"devDependencies": { | ||
"typescript": "^4.5.5" | ||
"typescript": "^5.4.5" | ||
}, | ||
"dependencies": { | ||
"@web3-onboard/common": "^2.3.3", | ||
"@web3-onboard/common": "^2.4.0-alpha.2", | ||
"fortmatic": "^2.2.1" | ||
} | ||
} |
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
7681
102
1