Skip to content

Commit

Permalink
papi outside
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut committed Oct 24, 2024
1 parent 6bc232e commit 2bd9d02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/example/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ const EXAMPLE_DAPP_NAME = 'example-dapp'
let injectedAccountsPjs: InjectedAccountWithMeta[] = []
let injectedAccountsPapi: InjectedPolkadotAccount[] = []

const client = createClient(withPolkadotSdkCompat(getWsProvider(PASEO_WS_PROVIDER)))
const papi = client.getTypedApi(pas)

document
.querySelector<HTMLButtonElement>('#connect-accounts-papi')!
.addEventListener('click', async () => {
Expand Down Expand Up @@ -104,9 +107,6 @@ document.querySelector<HTMLButtonElement>('#send-tx-pjs')!.addEventListener('cli
})

document.querySelector<HTMLButtonElement>('#send-tx-papi')!.addEventListener('click', async () => {
const client = createClient(withPolkadotSdkCompat(getWsProvider(PASEO_WS_PROVIDER)))
const papi = client.getTypedApi(pas)

const account = injectedAccountsPapi[0]

if (injectedAccountsPapi.length === 0) {
Expand Down

0 comments on commit 2bd9d02

Please sign in to comment.