-
Notifications
You must be signed in to change notification settings - Fork 147
Connecting fails, dev can't sign transactions on local devnet with Leather #6160
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
Comments
Additionally shared by the dev who reported this:
|
@314159265359879 what version of stacks.js are they using? Do both v6 and 7 have this issue? |
@kyranjamie, from the dev:
|
@kyranjamie update from the dev:
|
The transaction goes through without any issue, but the const response = await request('stx_callContract', {... is wrapped in a try/catch and it falls into the catch block. The error I'm catching is "JsonRpcError: User rejected transaction signing request" But I did not reject the transaction and it successfully confirmed. I just seem to be getting this back from the promise (maybe when the popup closes)? I've upgraded everything to the latest Connect libraries and am submitting transactions to testnet. |
Pinging @janniks too as he may know more. |
Any thoughts on what could cause this exception? My workflow is:
The trouble is the JsonRpcError puts me into the catch even though the transaction goes through. This means that I can't provide the user any feedback until the chainhook finally triggers the confirmation workflows to insert the record. It is functional, but the UI suffers without being able to provide the user PENDING feedback. |
To assist... I did see this in rpc-helpers.ts export async function handleRpcMessage({
method,
path,
port,
requestParams,
requestId,
}: HandleRpcMessageArgs) {
void trackRpcRequestSuccess({ endpoint: method });
const { urlParams, tabId } = makeSearchParamsWithDefaults(port, requestParams);
const { id } = await triggerRequestWindowOpen(path, urlParams);
listenForPopupClose({
tabId,
id,
response: createRpcErrorResponse(method, {
id: requestId,
error: {
code: RpcErrorCode.USER_REJECTION,
message: RpcErrorMessage.UserRejectedSigning,
},
}),
});
} Would this throw the exception any time the popup closes? Even if it closing itself after the transaction leaves? |
@codeonedotzero this is because closing the window is pretty much a cancel action. If you approve the action, it should fire the success event. If you were to immediately close window, this would trigger, but wouldn't matter as the success response promise has already resolved. |
Did you not read the defect, or maybe I'm not understanding your response to the issue? I am approving the message, the transaction is successfully sent to testnet, it successfully confirms. Still, when the popup closes itself I get the error message from the wallet provider.
|
Was this resolved in 6.65.1? I'm noticing I'm not seeing this error anymore. Not sure if it was because of something I changed or your new version. |
@ECBSJ Are you still seeing the issue with 6.65.1 of the Leather extension? |
Adding conversation with a dev here
Kyran mentioned this may be related to what is mentioned in #6117 and is discussing with Jannik about changes on their end (many).
The text was updated successfully, but these errors were encountered: