Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed Nov 16, 2024
1 parent c65abd9 commit 8d7d3d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
6 changes: 3 additions & 3 deletions packages/types/src/extrinsic/v5/Extrinsic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class GenericExtrinsicV5 extends Struct implements IExtrinsicV5Impl {

/**
* @description Add an [[ExtrinsicSignatureV5]] to the extrinsic (already generated)
*
*
* [Disabled for ExtrinsicV5]
*/
public addSignature (_signer: Address | Uint8Array | string, _signature: Uint8Array | HexString, _payload: ExtrinsicPayloadValue | Uint8Array | HexString): GenericExtrinsicV5 {
Expand All @@ -98,7 +98,7 @@ export class GenericExtrinsicV5 extends Struct implements IExtrinsicV5Impl {

/**
* @description Sign the extrinsic with a specific keypair
*
*
* [Disabled for ExtrinsicV5]
*/
public sign (_account: IKeyringPair, _options: SignatureOptions): GenericExtrinsicV5 {
Expand All @@ -107,7 +107,7 @@ export class GenericExtrinsicV5 extends Struct implements IExtrinsicV5Impl {

/**
* @describe Adds a fake signature to the extrinsic
*
*
* [Disabled for ExtrinsicV5]
*/
public signFake (_signer: Address | Uint8Array | string, _options: SignatureOptions): GenericExtrinsicV5 {
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/extrinsic/v5/ExtrinsicPayload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class GenericExtrinsicPayloadV5 extends Struct {

/**
* @description Sign the payload with the keypair
*
*
* [Disabled for ExtrinsicV5]
*/
public sign (_signerPair: IKeyringPair): Uint8Array {
Expand Down
15 changes: 4 additions & 11 deletions packages/types/src/extrinsic/v5/ExtrinsicSignature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,11 @@ import type { ExtrinsicPayloadValue, ICompact, IExtrinsicSignature, IKeyringPair
import type { ExtrinsicSignatureOptions } from '../types.js';

import { Struct } from '@polkadot/types-codec';
import { isU8a, isUndefined, objectProperties, objectSpread, stringify, u8aToHex } from '@polkadot/util';
import { objectProperties, objectSpread } from '@polkadot/util';

import { EMPTY_U8A, IMMORTAL_ERA } from '../constants.js';
import { GenericExtrinsicPayloadV5 } from './ExtrinsicPayload.js';

// Ensure we have enough data for all types of signatures
const FAKE_SIGNATURE = new Uint8Array(256).fill(1);

function toAddress (registry: Registry, address: Address | Uint8Array | string): Address {
return registry.createTypeUnsafe('Address', [isU8a(address) ? u8aToHex(address) : address]);
}

/**
* @name GenericExtrinsicSignatureV5
* @description
Expand Down Expand Up @@ -156,7 +149,7 @@ export class GenericExtrinsicSignatureV5 extends Struct implements IExtrinsicSig

/**
* @description Adds a raw signature
*
*
* [Disabled for ExtrinsicV5]
*/
public addSignature (_signer: Address | Uint8Array | string, _signature: Uint8Array | HexString, _payload: ExtrinsicPayloadValue | Uint8Array | HexString): IExtrinsicSignature {
Expand All @@ -179,7 +172,7 @@ export class GenericExtrinsicSignatureV5 extends Struct implements IExtrinsicSig

/**
* @description Generate a payload and applies the signature from a keypair
*
*
* [Disabled for ExtrinsicV5]
*/
public sign (_method: Call, _account: IKeyringPair, _options: SignatureOptions): IExtrinsicSignature {
Expand All @@ -188,7 +181,7 @@ export class GenericExtrinsicSignatureV5 extends Struct implements IExtrinsicSig

/**
* @description Generate a payload and applies a fake signature
*
*
* [Disabled for ExtrinsicV5]
*/
public signFake (_method: Call, _address: Address | Uint8Array | string, _options: SignatureOptions): IExtrinsicSignature {
Expand Down

0 comments on commit 8d7d3d3

Please sign in to comment.