-
Notifications
You must be signed in to change notification settings - Fork 285
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
Adding Staking Builder for Tao #5510
base: master
Are you sure you want to change the base?
Conversation
b4ed320
to
134d9a7
Compare
should.deepEqual(txJson.tip, 0); | ||
should.deepEqual(txJson.transactionVersion, 22); | ||
should.deepEqual(txJson.chainName, 'Westend'); | ||
should.deepEqual(txJson.eraPeriod, 64); |
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.
one interesting thing to check could be if it is able to re-build the transaction to the same transaction bytes - i think that this is something that happens during our internal transaction signing flow. could add something like this to the test:
const rawTx = tx.toBroadcastFormat();
const rebuilder = factory.from(rawTx);
rebuilder.sender({ ... }).validity({ ... }); // not sure if this part is needed
const rebuiltTx = await rebuilder.build();
assert(rebuiltTx.toBroadcastFormat() === rawTx);
if (this._addToStake) { | ||
tx = methods.staking.bondExtra({ maxAdditional: this._amount }, baseTxInfo.baseTxInfo, baseTxInfo.options); | ||
} else { | ||
tx = methods.staking.bond( | ||
{ controller: this._controller, value: this._amount, payee: this._payee }, | ||
baseTxInfo.baseTxInfo, | ||
baseTxInfo.options | ||
); | ||
} | ||
if (this._validityWindow && (tx as any).signature && baseTxInfo.options.registry) { |
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.
isn't this the DOT specific methods?
No description provided.