Skip to content

Commit

Permalink
Merge pull request #281 from skalenetwork/add-exports-for-sfuel
Browse files Browse the repository at this point in the history
Add exports for sFUEL station, update dependencies
  • Loading branch information
dmytrotkk authored Sep 4, 2024
2 parents a0a56ad + 401a5f2 commit 87792c5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
Binary file modified bun.lockb
Binary file not shown.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@skalenetwork/metaport",
"version": "3.0.0",
"version": "3.0.1",
"description": "SKALE Metaport Widget",
"keywords": [
"skale",
Expand Down Expand Up @@ -80,13 +80,13 @@
"@mui/icons-material": "^5.15.6",
"@mui/lab": "^5.0.0-alpha.162",
"@mui/material": "^5.15.6",
"@rainbow-me/rainbowkit": "^2.1.4",
"@rainbow-me/rainbowkit": "^2.1.5",
"@skalenetwork/ima-js": "2.0.2-develop.0",
"@tanstack/react-query": "^5.51.23",
"@tanstack/react-query": "^5.54.1",
"coingecko-api-v3": "^0.0.29",
"react-jazzicon": "^1.0.4",
"viem": "2.x",
"wagmi": "^2.12.5",
"viem": "2.21.1",
"wagmi": "^2.12.8",
"zustand": "^4.5.0"
},
"peerDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions src/core/sfuel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ export class Station {
}
}

isFaucetAvailable(): boolean {
return isFaucetAvailable(this.chainName, this.mpc.config.skaleNetwork)
}

async doPoW(address: AddressType): Promise<StationPowRes> {
// return { ok: true, message: 'PoW is not available for Ethereum Mainnet' };
if (!this.chainName || !isFaucetAvailable(this.chainName, this.mpc.config.skaleNetwork)) {
Expand Down
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ import { BASE_EXPLORER_URLS, GRAY_BG } from './core/constants'
import { toWei, fromWei } from './core/convertation'
import { ERC_ABIS } from './core/contracts'
import { sendTransaction } from './core/transactions'
import { Station, StationData } from './core/sfuel'


import { getWidgetTheme as getMetaportTheme } from './core/themes'

Expand Down Expand Up @@ -113,5 +115,7 @@ export {
RainbowConnectButton,
useConnectModal,
useAccountModal,
useChainModal
useChainModal,
Station,
type StationData
}

0 comments on commit 87792c5

Please sign in to comment.