Skip to content

Commit

Permalink
fix: change to BBACHAIN_SCHEMA
Browse files Browse the repository at this point in the history
  • Loading branch information
vambolapert committed Mar 13, 2023
1 parent 09bd502 commit 62d4e35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/publickey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Buffer} from 'buffer';
import {sha256} from '@noble/hashes/sha256';

import {isOnCurve} from './utils/ed25519';
import {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';
import {Struct, BBACHAIN_SCHEMA} from './utils/borsh-schema';
import {toBuffer} from './utils/to-buffer';

/**
Expand Down Expand Up @@ -253,7 +253,7 @@ export class PublicKey extends Struct {
}
}

SOLANA_SCHEMA.set(PublicKey, {
BBACHAIN_SCHEMA.set(PublicKey, {
kind: 'struct',
fields: [['_bn', 'u256']],
});
8 changes: 4 additions & 4 deletions src/utils/borsh-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ export class Struct {
}

encode(): Buffer {
return Buffer.from(serialize(SOLANA_SCHEMA, this));
return Buffer.from(serialize(BBACHAIN_SCHEMA, this));
}

static decode(data: Buffer): any {
return deserialize(SOLANA_SCHEMA, this, data);
return deserialize(BBACHAIN_SCHEMA, this, data);
}

static decodeUnchecked(data: Buffer): any {
return deserializeUnchecked(SOLANA_SCHEMA, this, data);
return deserializeUnchecked(BBACHAIN_SCHEMA, this, data);
}
}

Expand All @@ -35,4 +35,4 @@ export class Enum extends Struct {
}
}

export const SOLANA_SCHEMA: Map<Function, any> = new Map();
export const BBACHAIN_SCHEMA: Map<Function, any> = new Map();

0 comments on commit 62d4e35

Please sign in to comment.