Skip to content

Commit

Permalink
bump relay SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Apr 29, 2024
1 parent c0a6862 commit 0e75745
Show file tree
Hide file tree
Showing 4 changed files with 552 additions and 243 deletions.
2 changes: 1 addition & 1 deletion packages/account-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@rainbow-me/rainbowkit": "^2.0.2",
"@reservoir0x/relay-sdk": "^0.3.9",
"@reservoir0x/relay-sdk": "^0.4.0",
"@tanstack/react-query": "^5.28.8",
"abitype": "1.0.0",
"debug": "^4.3.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ export function DepositViaRelayForm(props: Props) {
relayClient.actions.bridge({
...params,
// TODO: translate this to something useful
onProgress(...args) {
console.log("onProgress", ...args);
onProgress(progress) {
console.log("onProgress", progress);
},
}),
});
Expand Down
8 changes: 7 additions & 1 deletion packages/account-kit/src/steps/deposit/useRelay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
fetchChainConfigs,
RelayClient,
createClient,
LogLevel,
} from "@reservoir0x/relay-sdk";
import { UseQueryResult, useQuery } from "@tanstack/react-query";
import { debug } from "../../debug";
Expand All @@ -21,7 +22,12 @@ export function useRelay(): UseQueryResult<{ client: RelayClient; chains: RelayC
debug("fetching relay chains from", baseApiUrl);
const chains = await fetchChainConfigs(baseApiUrl);
debug("got relay chains", chains);
const client = createClient({ baseApiUrl, source: appInfo.appOrigin, chains });
const client = createClient({
baseApiUrl,
source: appInfo.appOrigin,
chains,
logLevel: LogLevel.Verbose,
});
return { client, chains };
},
refetchOnMount: false,
Expand Down
Loading

0 comments on commit 0e75745

Please sign in to comment.