-
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
feat: WalletConnect integration, part 6, request #2029
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
77af87f
to
cb4af5c
Compare
cb4af5c
to
d84142d
Compare
d84142d
to
1bf9402
Compare
1bf9402
to
e39c43a
Compare
e39c43a
to
d6b398e
Compare
d6b398e
to
7c0b44d
Compare
eb983e1
to
6fbbfd2
Compare
6fbbfd2
to
4f823e4
Compare
4f823e4
to
ac2b1c3
Compare
ac2b1c3
to
0748cee
Compare
requests are supported. Tested: - send tez - delegate / undelegate - originate / call contract - stake / unstake / finalize unstake
0748cee
to
17d9d12
Compare
import { SuccessStep } from "../SuccessStep"; | ||
import { type CalculatedSignProps, type SdkSignPageProps } from "../utils"; | ||
|
||
export const useSignWithWalletConnect = ({ |
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.
please align the file name with the function
return openWith(<SuccessStep hash={opHash} />); | ||
}, | ||
error => ({ | ||
description: `Failed to confirm Beacon operation: ${error.message}`, |
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.
Beacon
operation in WC handler?
|
||
case "tezos_send": { | ||
if (!request.params.account) { | ||
throw new Error("Missing account in request"); |
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.
here and in other places we need to use CustomError
class for the custom errors
if (!network) { | ||
const response = formatJsonRpcError(id, getSdkError("INVALID_EVENT").message); | ||
await walletKit.respondSessionRequest({ topic, response }); | ||
toast({ description: `Unsupported network: ${chainId}`, status: "error" }); |
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.
basically we can throw an CustomError and it should be handled inside handleAsyncActionUnsafe
throw new Error(`Unsupported method ${request.method}`); | ||
} | ||
} | ||
// error => ({ |
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.
do we need this comment?
Proposed changes
requests are supported. Tested:
- send tez
- delegate / UndelegationSignPage
- originate / call contract
- stake / unstake / finalize unstake
- increase paid storage (rejected as not supported by Umami)
Types of changes
Steps to reproduce
Screenshots
Checklist