use whirligig in rpc

This commit is contained in:
saml33 2023-11-09 13:25:39 +11:00
parent 55753b4dbe
commit cf3f745585
1 changed files with 8 additions and 2 deletions

View File

@ -321,9 +321,15 @@ const mangoStore = create<MangoStore>()(
let connection: Connection
try {
connection = new web3.Connection(rpcUrl, CONNECTION_COMMITMENT)
connection = new web3.Connection(
`${rpcUrl}/whirligig/`,
CONNECTION_COMMITMENT,
)
} catch {
connection = new web3.Connection(ENDPOINT.url, CONNECTION_COMMITMENT)
connection = new web3.Connection(
`${ENDPOINT.url}/whirligig/`,
CONNECTION_COMMITMENT,
)
}
const provider = new AnchorProvider(connection, emptyWallet, options)
provider.opts.skipPreflight = true