-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Removing signer from the Action constructor #372
Comments
@marcelomorgado Here's what I was trying to convey in the thread that led to this issue. I "misspoke" so it didn't come across clearly. I think users would probably want to set the signer for the |
Ok, I agree. I'm thinking to keep the contract behavior the same as it's today. When a write function will be called the const rawTx = "...";
const action = new Action(rawTx, provider);
// add signer later
action.setSigner(tasitAccount);
action.send(); // same as signAndSend Makes sense? |
Oh okay, so it's already using the contract's signer by default? I see now. Then yeah, being able to override that with a custom signer is a useful feature - just shoudn't be a mandatory part of the constructor. If it were an optional part of the constructor with a default rather than using set, that would be fine with me too. No preference. |
const rawTx = "...";
const action = new Action(rawTx, provider);
// add signer later
action.setSigner(tasitAccount);
action.send(); // same as signAndSend In this ^ example, when is it signed? |
We have the private |
Ah right. Got it. Thanks! |
A signer shouldn't be mandatory for an
action
creation. A setter function should be created (Action.setSigner()
) instead.Notes:
Action.send()
function.tasit-account
package.The text was updated successfully, but these errors were encountered: