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

Swap to Mortal transactions by default #1081

Merged
merged 15 commits into from Jul 9, 2019
Merged

Swap to Mortal transactions by default #1081

merged 15 commits into from Jul 9, 2019

Conversation

jacogr
Copy link
Member

@jacogr jacogr commented Jul 8, 2019

  • signAndSend will retrieve the block (unless era or eraLength is specified)
  • eraLength is new - setting this to -1 indicated immortal, otherwise it is the length in blocks (defaults to 10)
  • I don't like the code that returns the nonce and signedBlock, so suggestions welcome

@jacogr jacogr added the WIP Work in Progress label Jul 8, 2019
@jacogr
Copy link
Member Author

jacogr commented Jul 8, 2019

Blocked on #1082 - sadly cannot actually do e2e tests here at all since all the indexes are off and it may or may not be operational.

EDIT: Merged above, updated e2e tests (and resurrected SignedBlock), does the correct thing byte-wise for both mortal and immortals.

@jacogr jacogr removed the WIP Work in Progress label Jul 9, 2019
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, tiny nits

@@ -76,11 +85,11 @@ export interface SubmittableExtrinsic<ApiType> extends IExtrinsic {

sign (account: IKeyringPair, _options: Partial<SignatureOptions>): this;

signAndSend (account: IKeyringPair | string | AccountId | Address, options?: Partial<SignatureOptions>): SumbitableResultResult<ApiType>;
signAndSend (account: IKeyringPair | string | AccountId | Address, options?: Partial<SignerOptions>): SumbitableResultResult<ApiType>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two lines above it's still SignatureOptions, I guess SignerOptions is more flexible there too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, cannot quite change the sign signature, which is a muck-up - since that sits in IExtrinsic. Had it changed and then it complains bitterly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah i see what you mean, ok

jacogr and others added 4 commits July 9, 2019 11:22
…issions_only/index.js

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>
…issions_only/index.js

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>
@jacogr jacogr merged commit 2eee6cf into master Jul 9, 2019
@jacogr jacogr deleted the jg-eras branch July 9, 2019 13:56
ianhe8x pushed a commit to plugblockchain/api.js that referenced this pull request Jul 30, 2019
* Start of mortal tx

* Swap to Mortal transcations by default

* Update SubmittableExtrinsic.ts

* WIP (pre master merge)

* Remove eraLength, allow era to specify

* Oops, linting.... it happens in the best of families

* WIP debugging immortals

* Re-surrect with working meta, and e2e tests

* Update docs/examples/promise/07_make_transfer_with_allowed_block_permissions_only/index.js

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>

* Update docs/examples/promise/07_make_transfer_with_allowed_block_permissions_only/index.js

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>

* Remove useless birth/death calls
ianhe8x pushed a commit to plugblockchain/api.js that referenced this pull request Jul 31, 2019
* Start of mortal tx

* Swap to Mortal transcations by default

* Update SubmittableExtrinsic.ts

* WIP (pre master merge)

* Remove eraLength, allow era to specify

* Oops, linting.... it happens in the best of families

* WIP debugging immortals

* Re-surrect with working meta, and e2e tests

* Update docs/examples/promise/07_make_transfer_with_allowed_block_permissions_only/index.js

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>

* Update docs/examples/promise/07_make_transfer_with_allowed_block_permissions_only/index.js

Co-Authored-By: Amaury Martiny <amaury.martiny@protonmail.com>

* Remove useless birth/death calls
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jun 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants