feat: use crypto-hash instead of hasha
This commit is contained in:
committed by
Michael Vines
parent
bd7e802e46
commit
402c160ae9
@ -224,42 +224,9 @@ test('equals (II)', () => {
|
||||
expect(key1.equals(key2)).toBe(true);
|
||||
});
|
||||
|
||||
test('createWithSeed', () => {
|
||||
const defaultPublicKey = new PublicKey([
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
]);
|
||||
const derivedKey = PublicKey.createWithSeed(
|
||||
test('createWithSeed', async () => {
|
||||
const defaultPublicKey = new PublicKey('11111111111111111111111111111111');
|
||||
const derivedKey = await PublicKey.createWithSeed(
|
||||
defaultPublicKey,
|
||||
'limber chicken: 4/45',
|
||||
defaultPublicKey,
|
||||
|
@ -22,10 +22,10 @@ if (!mockRpcEnabled) {
|
||||
jest.setTimeout(30000);
|
||||
}
|
||||
|
||||
test('createAccountWithSeed', () => {
|
||||
test('createAccountWithSeed', async () => {
|
||||
const fromPubkey = new Account().publicKey;
|
||||
const seed = 'test string';
|
||||
const newAccountPubkey = PublicKey.createWithSeed(
|
||||
const newAccountPubkey = await PublicKey.createWithSeed(
|
||||
fromPubkey,
|
||||
seed,
|
||||
StakeProgram.programId,
|
||||
@ -180,10 +180,10 @@ test('deactivate', () => {
|
||||
expect(params).toEqual(StakeInstruction.decodeDeactivate(stakeInstruction));
|
||||
});
|
||||
|
||||
test('StakeInstructions', () => {
|
||||
test('StakeInstructions', async () => {
|
||||
const from = new Account();
|
||||
const seed = 'test string';
|
||||
const newAccountPubkey = PublicKey.createWithSeed(
|
||||
const newAccountPubkey = await PublicKey.createWithSeed(
|
||||
from.publicKey,
|
||||
seed,
|
||||
StakeProgram.programId,
|
||||
@ -288,7 +288,7 @@ test('live staking actions', async () => {
|
||||
|
||||
// Create Stake account with seed
|
||||
const seed = 'test string';
|
||||
const newAccountPubkey = PublicKey.createWithSeed(
|
||||
const newAccountPubkey = await PublicKey.createWithSeed(
|
||||
from.publicKey,
|
||||
seed,
|
||||
StakeProgram.programId,
|
||||
|
@ -8,9 +8,7 @@ test('invalid', () => {
|
||||
});
|
||||
|
||||
test('stable', () => {
|
||||
expect(testnetChannelEndpoint('stable')).toEqual(
|
||||
'https://devnet.solana.com',
|
||||
);
|
||||
expect(testnetChannelEndpoint('stable')).toEqual('https://devnet.solana.com');
|
||||
|
||||
expect(testnetChannelEndpoint('stable', true)).toEqual(
|
||||
'https://devnet.solana.com',
|
||||
|
Reference in New Issue
Block a user