-
Notifications
You must be signed in to change notification settings - Fork 25
feat: change params to options object #601
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
base: master
Are you sure you want to change the base?
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
synapse-dev | 004977b | Commit Preview URL Branch Preview URL |
Feb 10 2026, 07:24 PM |
e124516 to
30ae9b8
Compare
…permit deadlines, and standardize client address parameter
…ageInfo and change download method to object params
831d2a8 to
cdd7473
Compare
|
|
||
| const amount = parseUnits("100"); | ||
| const hash = await synapse.payments.depositWithPermit(amount); | ||
| const hash = await synapse.payments.depositWithPermit({amount}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have a lint rule on mdx files? this should be spaced to be consistent with the rest of the docs and with the linter rules for the code I think, 3 instances of {amount} here, docs/src/content/docs/developer-guides/payments/rails-settlement.mdx has the same problem, the others look fine I think
| // ---cut--- | ||
| // Check current USDFC balance | ||
| const walletBalance = await synapse.payments.walletBalance(TOKENS.USDFC); | ||
| const walletBalance = await synapse.payments.walletBalance({token:TOKENS.USDFC}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'nother one
|
|
||
| // Download from this context | ||
| const downloaded = await context.download(result.pieceCid); | ||
| const downloaded = await context.download({pieceCid: result.pieceCid}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and another
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced about address here, its the client whose data sets we are looking for, an address could be anything - SP address, contract address, ..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be wallet to align with some of the payments terminology
| } | ||
|
|
||
| const deadline = options.deadline ?? BigInt(Math.floor(Date.now() / 1000) + 3600) // 1 hour | ||
| const deadline = options.deadline ?? BigInt(Math.floor(Date.now() / 1000) + TIME_CONSTANTS.PERMIT_DEADLINE_DURATION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| const filBalance = await synapse.payments.walletBalance() | ||
| const usdfcBalance = await synapse.payments.walletBalance('USDFC') | ||
| const usdfcBalance = await synapse.payments.walletBalance({ | ||
| token: 'USDFC', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should be using the constant for this one, easy to mistype as USDC
Uh oh!
There was an error while loading. Please reload this page.