-
Notifications
You must be signed in to change notification settings - Fork 11
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
PLT-7691 flat version get transaction per contract #40
PLT-7691 flat version get transaction per contract #40
Conversation
// DISCUSSION: What should this return when contractId is not found? Currently it throws an exception | ||
// with an AxiosError 404, we could return a nullable value or wrap the error into a custom | ||
// ContractNotFound error and specify it in the docs. |
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.
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's fine if we throw an exception here - the caller should be sure the contract exists, not use this as a means of testing for its existence. Wrapping in a custom error is not a bad idea.
@@ -5,7 +5,7 @@ import { split } from "fp-ts/lib/string.js"; | |||
import { pipe } from "fp-ts/lib/function.js"; | |||
import { head } from "fp-ts/lib/ReadonlyNonEmptyArray.js"; | |||
import { TxId } from "../tx/id.js"; | |||
import { ContractId } from "../contract/id.js"; | |||
import { ContractIdGuard } from "../contract/id.js"; | |||
import { AssetId, Assets } from "../asset/index.js"; | |||
|
|||
// QUESTION: @N.H: What is the difference between PayoutId and WithdrawalId? |
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.
cc @nhenin
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.
PayoutId is the id of the payout 🙂 meaning you’ll use it to withdraw the tokens from these payouts….
WithdrawalId are the id of the Tx when you withdraw from this payout…
@@ -3,10 +3,18 @@ import * as t from "io-ts/lib/index.js"; | |||
export type Tag = t.TypeOf<typeof Tag>; | |||
export const Tag = t.string; | |||
|
|||
export type TagContent = t.TypeOf<typeof TagContent>; | |||
// QUESTION: @Jamie, N.H. is this right, TagContent can be anything? |
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.
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 think so...
@@ -5,7 +5,11 @@ | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |||
<title>Vesting Flow</title> | |||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |||
<script src="/dist/local-importmap.js"></script> | |||
<!-- This import map tells the browser what version of the SDK to use, use the local-importmap for local | |||
development and the jsdelivr importmap for the latest published version. |
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.
cool
This PR adds the method
getTransactionsForContract
to the RestAPI of theruntime-rest-client
and improves the generated documentation of related methods. To test you can build the project, modify thepoc/rest-client-flow.html
so that it uses local build and not latest release and then use the new method from the page.Also, build the docs and make sure that the documentation makes sense.
@nhenin , @jhbertra , please note the DISCUSSION topics added in this PR