Skip to content
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

Error swapping #112

Open
djmbritt opened this issue Apr 29, 2024 · 4 comments
Open

Error swapping #112

djmbritt opened this issue Apr 29, 2024 · 4 comments

Comments

@djmbritt
Copy link
Member

djmbritt commented Apr 29, 2024

There is an error swapping on eos mainnet, I've notifed it while bootstrapping the testing framework.

✓ Swap > swap() should throw an error when Session is not set on Client. [0.29ms]

93 | efxPrice,
94 | });
95 |
96 | return await transact({ action });
97 | } catch (e) {
98 | throw new Error(Error swapping tokens\n${e});
^
error: Error swapping tokens
Error: transaction declares authority
'{"actor":"cryptonode42","permission":"owner"}', but does not have signatures for it under a provided delay of 0 ms,
provided permissions [],
provided keys ["redacted_key_here"],
and a delay max limit of 3888000000 ms
at /home/djmbritt/Effect/effect-js/src/actions/token/swap.ts:98:9

I'm not understanding what the error is, but I'm writing it here for future reference.
First thoughts are as stated in the error message, that the transasction is not signed by the owner, but I'm pretty sure I'm using the right keys, need to double check that.

@Jeffrieh
Copy link
Contributor

Good catch !! I think there was something wrong with the enum/object indexing for the actions, i fixed that now, could you try it again ?

@djmbritt
Copy link
Member Author

Great, let me check it.

@djmbritt
Copy link
Member Author

djmbritt commented Apr 30, 2024

Nope, that's not it, still getting the same error.

error: transaction declares authority '{"actor":"cryptonode42","permission":"owner"}', but does not have signatures for it under a provid
ed delay of 0 ms, provided permissions [], provided keys ["redacted_key"], and a delay max limit
 of 3888000000 ms

I'm thinking it has to be a parameter somewhere in the Session.

There is an upgradeTransaction function where you can set the delay_sec parameter.

https://github.com/wharfkit/session/blob/749881f84aee1d01586c24c9ed098a11e95d0b5a/src/session.ts#L208

@djmbritt
Copy link
Member Author

I'm also getting the same kind of error when I try to another kind of authorized transaction, in this case a deposit:

error: transaction declares authority '{"actor":"cryptonode42","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [], provided keys ["key_redacted"], and a delay max limit of 3888000000 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants