-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support for getBalance #20
Support for getBalance #20
Conversation
573add8
to
090c935
Compare
090c935
to
c6e299d
Compare
…criptions added getInscriptions request
@@ -7,7 +7,8 @@ import { MethodParamsAndResult, rpcRequestMessageSchema } from '../../types'; | |||
import * as v from 'valibot'; | |||
|
|||
export const getInfoMethodName = 'getInfo'; | |||
export const getInfoParamsSchema = v.null(); | |||
export const getInfoParamsSchema = v.nullish(v.null()); |
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.
For maximum compatibility, so devs can use either null
or undefined
when no params are needed. We should have come up with a better API that doesn't require the request(arg1, arg2)
function to necessarily need a second argument.
@@ -26,6 +26,8 @@ export interface RequestOptions<Payload extends RequestPayload, Response> { | |||
|
|||
// RPC Request and Response types | |||
|
|||
export const RpcIdSchema = v.optional(v.union([v.string(), v.number(), v.null()])); |
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.
curious: is this equivalent?
export const RpcIdSchema = v.optional(v.union([v.string(), v.number(), v.null()])); | |
export const RpcIdSchema = v.nullish(v.union([v.string(), v.number()])); |
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.
yes, recently learned about nullish, makes for more compact type defs
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.
question: is this a breaking version?
i see wallet_connect and wallet_disconnect were removed, but not sure if those were released yet?
It shouldn't break existing apps. The changes are mostly additive. The wallet_connect/disconnect methods were never used / released / documented. I should have closed #18 as the work here superseded some of that work. |
f9fbf35
into
revert-22-revert-18-eduard/schema-validators
getBalance
.https://linear.app/xverseapp/issue/ENG-4527