Skip to content

Commit

Permalink
Git marcopitra/main (MystenLabs#17020)
Browse files Browse the repository at this point in the history
## Description 

Describe the changes or additions included in this PR.

## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and do not break anything, you can
skip the following section. Otherwise, please briefly describe what has
changed under the Release Notes section.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes

---------

Co-authored-by: git-marcopitra <[email protected]>
Co-authored-by: Marco Pitra <[email protected]>
  • Loading branch information
3 people authored Apr 3, 2024
1 parent 59168f7 commit b8f2a85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-queens-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@mysten/zksend': patch
---

Handle the fetch function for environments that don't support window
4 changes: 4 additions & 0 deletions sdk/zksend/src/links/list-created-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,26 @@ export async function listCreatedLinks({
cursor,
network,
contract = MAINNET_CONTRACT_IDS,
fetch: fetchFn,
...linkOptions
}: {
address: string;
contract?: ZkBagContractOptions;
cursor?: string;
network?: 'mainnet' | 'testnet';

// Link options:
host?: string;
path?: string;
client?: SuiClient;
fetch?: typeof fetch;
}) {
const gqlClient = new SuiGraphQLClient({
url:
network === 'testnet'
? 'https://sui-testnet.mystenlabs.com/graphql'
: 'https://sui-mainnet.mystenlabs.com/graphql',
fetch: fetchFn,
});

const packageId = normalizeSuiAddress(contract.packageId);
Expand Down

0 comments on commit b8f2a85

Please sign in to comment.