Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut committed Oct 18, 2024
1 parent 5d01e2d commit 44668fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { InjectedAccountWitMnemonic } from '@chainsafe/cypress-polkadot-wallet/dist/types'
import { waitForAuthRequest } from '../utils/waitForAuthRequests'

const Alice = {
address: '5Fsaew2ZtsgpaCUWDmBnz8Jn8i49dvJFQUaJ5TZ6NGC1EBeS',
addressWithPrefix0: '14osoGHdkexJ1jV2BQEo8H8vzL3oLDrPUyJnEkYSvMDXQcu7',
name: 'Alice',
type: 'sr25519',
mnemonic: 'blame only east lunar valve mother link pill expect eight quote table'
} as InjectedAccountWitMnemonic
} as any

const EXAMPLE_DAPP_NAME = 'example-dapp'
const CUSTOM_WALLET_NAME = 'My-custom-wallet'
Expand Down Expand Up @@ -106,7 +106,7 @@ describe('test cypress-polkadot-wallet plugin', () => {
cy.getTxRequests().then((req) => {
const txRequests = Object.values(req)
cy.wrap(txRequests.length).should('eq', 1)
cy.wrap(txRequests[0].payload.address).should('eq', Alice.address)
cy.wrap(txRequests[0].payload.address).should('eq', Alice.addressWithPrefix0)
cy.approveTx(txRequests[0].id)
cy.get('#tx-hash').should('not.be.empty')
cy.get('#tx-events', { timeout: 10000 }).should('contain', 'system.ExtrinsicSuccess')
Expand All @@ -129,7 +129,7 @@ describe('test cypress-polkadot-wallet plugin', () => {
cy.getTxRequests().then((req) => {
const txRequests = Object.values(req)
cy.wrap(txRequests.length).should('eq', 1)
cy.wrap(txRequests[0].payload.address).should('eq', Alice.address)
cy.wrap(txRequests[0].payload.address).should('eq', Alice.addressWithPrefix0)
cy.approveTx(txRequests[0].id)
// the tx hash will be present, but the chain will reject the
// tx eventually
Expand Down
4 changes: 2 additions & 2 deletions packages/example/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { web3Accounts, web3Enable, web3FromSource } from '@polkadot/extension-da
import { ApiPromise, WsProvider } from '@polkadot/api'
import { InjectedAccountWithMeta } from '@polkadot/extension-inject/types'

const ROCOCO_WS_PROVIDER = 'wss://rococo-rpc.polkadot.io'
const PASEO_WS_PROVIDER = 'wss://rpc.ibp.network/paseo'
let injectedAccounts: InjectedAccountWithMeta[] = []

document
Expand All @@ -28,7 +28,7 @@ document
})

document.querySelector<HTMLButtonElement>('#send-tx')!.addEventListener('click', async () => {
const provider = new WsProvider(ROCOCO_WS_PROVIDER)
const provider = new WsProvider(PASEO_WS_PROVIDER)
const api = await ApiPromise.create({ provider })

// Initialise the provider to connect to the local node
Expand Down

0 comments on commit 44668fe

Please sign in to comment.