-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: switch alchemy client configs to use alchemy transport
- Loading branch information
Showing
36 changed files
with
712 additions
and
479 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import type { AlchemyTransport } from "@account-kit/infra"; | ||
import type { AlchemyAccountsConfig } from "../types"; | ||
|
||
export function getAlchemyTransport( | ||
config: AlchemyAccountsConfig | ||
): AlchemyTransport { | ||
return config.store.getState().transport; | ||
} |
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
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
93 changes: 93 additions & 0 deletions
93
account-kit/infra/src/__snapshots__/alchemyTransport.test.ts.snap
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,93 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`Alchemy Transport Tests > should correctly create a split transport 1`] = ` | ||
[ | ||
{ | ||
"fallback": [Function], | ||
"overrides": [ | ||
{ | ||
"methods": [ | ||
"eth_sendUserOperation", | ||
"eth_estimateUserOperationGas", | ||
"eth_getUserOperationReceipt", | ||
"eth_getUserOperationByHash", | ||
"eth_supportedEntryPoints", | ||
"rundler_maxPriorityFeePerGas", | ||
"pm_getPaymasterData", | ||
"pm_getPaymasterStubData", | ||
], | ||
"transport": [Function], | ||
}, | ||
], | ||
}, | ||
] | ||
`; | ||
|
||
exports[`Alchemy Transport Tests > should correctly create a split transport 2`] = ` | ||
[ | ||
{ | ||
"fallback": [Function], | ||
"overrides": [ | ||
{ | ||
"methods": [ | ||
"eth_sendUserOperation", | ||
"eth_estimateUserOperationGas", | ||
"eth_getUserOperationReceipt", | ||
"eth_getUserOperationByHash", | ||
"eth_supportedEntryPoints", | ||
"rundler_maxPriorityFeePerGas", | ||
"pm_getPaymasterData", | ||
"pm_getPaymasterStubData", | ||
], | ||
"transport": [Function], | ||
}, | ||
], | ||
}, | ||
] | ||
`; | ||
|
||
exports[`Alchemy Transport Tests > should correctly create a split transport 3`] = ` | ||
[ | ||
{ | ||
"fallback": [Function], | ||
"overrides": [ | ||
{ | ||
"methods": [ | ||
"eth_sendUserOperation", | ||
"eth_estimateUserOperationGas", | ||
"eth_getUserOperationReceipt", | ||
"eth_getUserOperationByHash", | ||
"eth_supportedEntryPoints", | ||
"rundler_maxPriorityFeePerGas", | ||
"pm_getPaymasterData", | ||
"pm_getPaymasterStubData", | ||
], | ||
"transport": [Function], | ||
}, | ||
], | ||
}, | ||
] | ||
`; | ||
|
||
exports[`Alchemy Transport Tests > should correctly create a split transport 4`] = ` | ||
[ | ||
{ | ||
"fallback": [Function], | ||
"overrides": [ | ||
{ | ||
"methods": [ | ||
"eth_sendUserOperation", | ||
"eth_estimateUserOperationGas", | ||
"eth_getUserOperationReceipt", | ||
"eth_getUserOperationByHash", | ||
"eth_supportedEntryPoints", | ||
"rundler_maxPriorityFeePerGas", | ||
"pm_getPaymasterData", | ||
"pm_getPaymasterStubData", | ||
], | ||
"transport": [Function], | ||
}, | ||
], | ||
}, | ||
] | ||
`; |
Oops, something went wrong.