fix: update NonceAccount to upstream changes

This commit is contained in:
Trent Nelson
2020-03-05 09:44:56 -07:00
committed by Michael Vines
parent 3b55087a86
commit 890e21c451
7 changed files with 43 additions and 18 deletions

View File

@ -11,6 +11,7 @@ import {
sendAndConfirmRecentTransaction,
LAMPORTS_PER_SOL,
} from '../src';
import {NONCE_ACCOUNT_LENGTH} from '../src/nonce-account';
import {mockRpcEnabled} from './__mocks__/node-fetch';
import {sleep} from '../src/util/sleep';
import {url} from './url';
@ -95,7 +96,7 @@ test('createNonceAccount', () => {
fromPubkey: params.fromPubkey,
newAccountPubkey: params.noncePubkey,
lamports: params.lamports,
space: SystemProgram.nonceSpace,
space: NONCE_ACCOUNT_LENGTH,
programId: SystemProgram.programId,
};
expect(createParams).toEqual(
@ -203,7 +204,7 @@ test('live Nonce actions', async () => {
await connection.requestAirdrop(newAuthority.publicKey, LAMPORTS_PER_SOL);
const minimumAmount = await connection.getMinimumBalanceForRentExemption(
SystemProgram.nonceSpace,
NONCE_ACCOUNT_LENGTH,
'recent',
);