-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Working web3 hook * Create test * Move chains to a separate file * fix test * Centralised web3 functionality * Update readme --------- Co-authored-by: Elliot Braem <[email protected]>
- Loading branch information
1 parent
d3ab5ec
commit 9608b0a
Showing
7 changed files
with
2,614 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { expect, test } from "@playwright/test"; | ||
|
||
import { waitForSelectorToBeVisible } from "../testUtils"; | ||
|
||
test("should be possible to interact with web3 widgets", async ({ page }) => { | ||
await page.goto("/"); | ||
|
||
await page.evaluate(() => { | ||
document.body.innerHTML = ` | ||
<near-social-viewer src="zavodil.near/widget/Lido"></near-social-viewer> | ||
`; | ||
}); | ||
|
||
await waitForSelectorToBeVisible( | ||
page, | ||
'near-social-viewer[src="zavodil.near/widget/Lido"]' | ||
); | ||
|
||
await waitForSelectorToBeVisible( | ||
page, | ||
"body > near-social-viewer > div > div > div > div.LidoStakeForm" | ||
); | ||
|
||
const Web3ConnectButton = await page.getByRole("button", { name: "Connect with Web3" }); | ||
|
||
await Web3ConnectButton.click(); | ||
|
||
await expect(await page.getByRole("button", { name: "Connecting"})).toBeVisible(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"token": "ETH", | ||
"label": "Ethereum Mainnet", | ||
"rpcUrl": "https://rpc.ankr.com/eth" | ||
}, | ||
{ | ||
"id": 3, | ||
"token": "ETH", | ||
"label": "Ropsten - Ethereum Testnet", | ||
"rpcUrl": "https://rpc.ankr.com/eth_ropsten" | ||
}, | ||
{ | ||
"id": 5, | ||
"token": "ETH", | ||
"label": "Goerli - Ethereum Testnet", | ||
"rpcUrl": "https://rpc.ankr.com/eth_goerli" | ||
}, | ||
{ | ||
"id": 10, | ||
"token": "ETH", | ||
"label": "Optimism", | ||
"rpcUrl": "https://rpc.ankr.com/optimism" | ||
}, | ||
{ | ||
"id": 420, | ||
"token": "ETH", | ||
"label": "Optimism Goerli Testnet", | ||
"rpcUrl": "https://optimism-goerli.publicnode.com" | ||
}, | ||
{ | ||
"id": 56, | ||
"token": "BNB", | ||
"label": "Binance Smart Chain Mainnet", | ||
"rpcUrl": "https://bsc.publicnode.com" | ||
}, | ||
{ | ||
"id": 97, | ||
"token": "tBNB", | ||
"label": "Binance Smart Chain Testnet", | ||
"rpcUrl": "https://bsc-testnet.publicnode.com" | ||
}, | ||
{ | ||
"id": 1313161554, | ||
"token": "ETH", | ||
"label": "Aurora Mainnet", | ||
"rpcUrl": "https://mainnet.aurora.dev" | ||
}, | ||
{ | ||
"id": 1313161555, | ||
"token": "ETH", | ||
"label": "Aurora Testnet", | ||
"rpcUrl": "https://testnet.aurora.dev" | ||
}, | ||
{ | ||
"id": 137, | ||
"token": "MATIC", | ||
"label": "Polygon Mainnet", | ||
"rpcUrl": "https://rpc.ankr.com/polygon" | ||
}, | ||
{ | ||
"id": 80001, | ||
"token": "MATIC", | ||
"label": "Polygon Testnet Mumbai", | ||
"rpcUrl": "https://rpc.ankr.com/polygon_mumbai" | ||
}, | ||
{ | ||
"id": 280, | ||
"token": "ETH", | ||
"label": "zkSync Era Testnet", | ||
"rpcUrl": "https://testnet.era.zksync.dev" | ||
}, | ||
{ | ||
"id": 324, | ||
"token": "ETH", | ||
"label": "zkSync Era Mainnet", | ||
"rpcUrl": "https://zksync2-mainnet.zksync.io" | ||
}, | ||
{ | ||
"id": 1101, | ||
"token": "ETH", | ||
"label": "Polygon zkEVM", | ||
"rpcUrl": "https://zkevm-rpc.com" | ||
}, | ||
{ | ||
"id": 1442, | ||
"token": "ETH", | ||
"label": "Polygon zkEVM Testnet", | ||
"rpcUrl": "https://rpc.public.zkevm-test.net" | ||
}, | ||
{ | ||
"id": 42161, | ||
"token": "ETH", | ||
"label": "Arbitrum One Mainnet", | ||
"rpcUrl": "https://arb1.arbitrum.io/rpc" | ||
}, | ||
{ | ||
"id": 42170, | ||
"token": "ETH", | ||
"label": "Arbitrum Nova", | ||
"rpcUrl": "https://nova.arbitrum.io/rpc" | ||
}, | ||
{ | ||
"id": 421613, | ||
"token": "AGOR", | ||
"label": "Arbitrum Goerli", | ||
"rpcUrl": "https://goerli-rollup.arbitrum.io/rpc" | ||
}, | ||
{ | ||
"id": 25, | ||
"token": "CRO", | ||
"label": "Cronos Mainnet Beta", | ||
"rpcUrl": "https://evm.cronos.org" | ||
}, | ||
{ | ||
"id": 338, | ||
"token": "TCRO", | ||
"label": "Cronos Testnet", | ||
"rpcUrl": "https://evm-t3.cronos.org" | ||
}, | ||
{ | ||
"id": 100, | ||
"token": "XDAI", | ||
"label": "Gnosis", | ||
"rpcUrl": "https://rpc.ankr.com/gnosis" | ||
}, | ||
{ | ||
"id": 10200, | ||
"token": "XDAI", | ||
"label": "Gnosis Chiado Testnet", | ||
"rpcUrl": "https://rpc.chiadochain.net" | ||
}, | ||
{ | ||
"id": 42220, | ||
"token": "CELO", | ||
"label": "Celo Mainnet", | ||
"rpcUrl": "https://rpc.ankr.com/celo" | ||
}, | ||
{ | ||
"id": 44787, | ||
"token": "CELO", | ||
"label": "Celo Alfajores Testnet", | ||
"rpcUrl": "https://alfajores-forno.celo-testnet.org" | ||
}, | ||
{ | ||
"id": 43114, | ||
"token": "AVAX", | ||
"label": "Avalanche C-Chain", | ||
"rpcUrl": "https://rpc.ankr.com/avalanche" | ||
}, | ||
{ | ||
"id": 43113, | ||
"token": "AVAX", | ||
"label": "Avalanche Fuji Testnet", | ||
"rpcUrl": "https://rpc.ankr.com/avalanche_fuji" | ||
}, | ||
{ | ||
"id": 250, | ||
"token": "FTM", | ||
"label": "Fantom Opera", | ||
"rpcUrl": "https://rpc.ankr.com/fantom" | ||
}, | ||
{ | ||
"id": 4002, | ||
"token": "FTM", | ||
"label": "Fantom Testnet", | ||
"rpcUrl": "https://rpc.ankr.com/fantom_testnet" | ||
}, | ||
{ | ||
"id": 1284, | ||
"token": "GLMR", | ||
"label": "Moonbeam", | ||
"rpcUrl": "https://rpc.ankr.com/moonbeam" | ||
}, | ||
{ | ||
"id": 61, | ||
"token": "ETC", | ||
"label": "Ethereum Classic Mainnet", | ||
"rpcUrl": "https://etc.rivet.link" | ||
}, | ||
{ | ||
"id": 84531, | ||
"token": "ETH", | ||
"label": "Base Goerli Testnet", | ||
"rpcUrl": "https://goerli.base.org" | ||
}, | ||
{ | ||
"id": 8453, | ||
"token": "ETH", | ||
"label": "Base", | ||
"rpcUrl": "https://mainnet.base.org" | ||
}, | ||
{ | ||
"id": 5001, | ||
"token": "MNT", | ||
"label": "Mantle Testnet", | ||
"rpcUrl": "https://rpc.testnet.mantle.xyz" | ||
}, | ||
{ | ||
"id": 5000, | ||
"token": "MNT", | ||
"label": "Mantle", | ||
"rpcUrl": "https://rpc.mantle.xyz" | ||
} | ||
] |
Oops, something went wrong.