Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore api warnings #538

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/core/src/blockchain/block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ export class Block {
getSpecExtensions(registry, chain, version.specName),
this.#chain.api.signedExtensions,
),
true,
)
return registry
})
Expand Down
4 changes: 1 addition & 3 deletions packages/e2e/src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ export const setupAll = async ({
} else {
provider = new WsProvider(endpoint)
}
const api = new Api(provider, {
SetEvmOrigin: { payload: {}, extrinsic: {} },
})
const api = new Api(provider)

await api.isReady

Expand Down
5 changes: 3 additions & 2 deletions packages/testing/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export type SetupOption = {
port?: number
maxMemoryBlockCount?: number
resume?: boolean | HexString | number
runtimeLogLevel?: number
}

export type SetupConfig = Config & {
Expand All @@ -43,6 +44,7 @@ export const createConfig = ({
port,
maxMemoryBlockCount,
resume,
runtimeLogLevel,
}: SetupOption): SetupConfig => {
// random port if not specified
port = port ?? Math.floor(Math.random() * 10000) + 10000
Expand All @@ -53,6 +55,7 @@ export const createConfig = ({
'mock-signature-host': true,
'build-block-mode': BuildBlockMode.Manual,
'max-memory-block-count': maxMemoryBlockCount ?? 100,
'runtime-log-level': runtimeLogLevel,
db,
'wasm-override': wasmOverride,
timeout,
Expand All @@ -75,8 +78,6 @@ export const setupContextWithConfig = async ({ timeout, ...config }: SetupConfig
noInitWarn: true,
})

await api.isReady

return {
url,
chain,
Expand Down
2 changes: 1 addition & 1 deletion packages/web-test/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function App() {
})

const provider = new ChopsticksProvider(globalThis.chain)
const api = new ApiPromise({ provider })
const api = new ApiPromise({ provider, noInitWarn: true })
await api.isReadyOrError
globalThis.api = api

Expand Down