Small typos (#1464)
This commit is contained in:
@@ -60,7 +60,7 @@ export default class Extrinsic extends Base<ExtrinsicVx | ExtrinsicUnknown> impl
|
||||
const type = VERSIONS[version & UNMASK_VERSION] || VERSIONS[0];
|
||||
|
||||
// we cast here since the VERSION definition is incredibly broad - we don't have a slice for
|
||||
// "only add extrinsic types", and more string definitions become unwieldly
|
||||
// "only add extrinsic types", and more string definitions become unwieldy
|
||||
return createType(type, value, { isSigned, version }) as ExtrinsicVx;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ export default class Extrinsic extends Base<ExtrinsicVx | ExtrinsicUnknown> impl
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Thge argument defintions, compatible with [[Call]]
|
||||
* @description The argument definitions, compatible with [[Call]]
|
||||
*/
|
||||
public get argsDef (): ArgsDef {
|
||||
return this.method.argsDef;
|
||||
@@ -139,7 +139,7 @@ export default class Extrinsic extends Base<ExtrinsicVx | ExtrinsicUnknown> impl
|
||||
}
|
||||
|
||||
/**
|
||||
* @description The era for thios extrinsic
|
||||
* @description The era for this extrinsic
|
||||
*/
|
||||
public get era (): ExtrinsicEra {
|
||||
return (this.raw as ExtrinsicVx).signature.era;
|
||||
|
||||
@@ -225,7 +225,7 @@ export default class ExtrinsicEra extends Enum implements IExtrinsicEra {
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Overide the encoded length method
|
||||
* @description Override the encoded length method
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
if (this.index === 0) {
|
||||
|
||||
@@ -118,7 +118,7 @@ export default class ExtrinsicPayload extends Base<ExtrinsicPayloadVx> {
|
||||
// This is extensible, so we could quite readily extend to send back extra
|
||||
// information, such as for instance the payload, i.e. `payload: this.toHex()`
|
||||
// For the case here we sign via the extrinsic, we ignore the return, so generally
|
||||
// thisis applicable for external signing
|
||||
// this is applicable for external signing
|
||||
return {
|
||||
signature: u8aToHex(signature)
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@ export default class ExtrinsicSignatureV1 extends Struct implements IExtrinsicSi
|
||||
}
|
||||
|
||||
/**
|
||||
* @description The actuall [[Signature]] hash
|
||||
* @description The actual [[Signature]] hash
|
||||
*/
|
||||
public get signature (): Signature {
|
||||
return this.get('signature') as Signature;
|
||||
@@ -116,7 +116,7 @@ export default class ExtrinsicSignatureV1 extends Struct implements IExtrinsicSi
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Generate a payload and pplies the signature from a keypair
|
||||
* @description Generate a payload and applies the signature from a keypair
|
||||
*/
|
||||
public sign (method: Call, account: IKeyringPair, { blockHash, era, genesisHash, nonce }: SignatureOptions): IExtrinsicSignature {
|
||||
const signer = createType('Address', account.publicKey);
|
||||
@@ -126,7 +126,7 @@ export default class ExtrinsicSignatureV1 extends Struct implements IExtrinsicSi
|
||||
genesisHash,
|
||||
method: method.toHex(),
|
||||
nonce,
|
||||
specVersion: 0, // unsed for v1, added for compat
|
||||
specVersion: 0, // unused for v1, added for compat
|
||||
tip: 0
|
||||
});
|
||||
const signature = createType('Signature', payload.sign(account));
|
||||
|
||||
@@ -71,7 +71,7 @@ export default class ExtrinsicSignatureV2 extends Struct implements IExtrinsicSi
|
||||
}
|
||||
|
||||
/**
|
||||
* @description The actuall [[Signature]] hash
|
||||
* @description The actual [[Signature]] hash
|
||||
*/
|
||||
public get signature (): Signature {
|
||||
return this.get('signature') as Signature;
|
||||
@@ -113,7 +113,7 @@ export default class ExtrinsicSignatureV2 extends Struct implements IExtrinsicSi
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Generate a payload and pplies the signature from a keypair
|
||||
* @description Generate a payload and applies the signature from a keypair
|
||||
*/
|
||||
public sign (method: Call, account: IKeyringPair, { blockHash, era, genesisHash, nonce, tip }: SignatureOptions): IExtrinsicSignature {
|
||||
const signer = createType('Address', account.publicKey);
|
||||
|
||||
Reference in New Issue
Block a user