fix: use base64 encoding by default for account data
This commit is contained in:
committed by
Justin Starry
parent
88ca04dbdb
commit
97e53f867f
@ -63,7 +63,7 @@ test('get account info - not found', async () => {
|
||||
url,
|
||||
{
|
||||
method: 'getAccountInfo',
|
||||
params: [account.publicKey.toBase58()],
|
||||
params: [account.publicKey.toBase58(), {encoding: 'binary64'}],
|
||||
},
|
||||
{
|
||||
error: null,
|
||||
@ -253,7 +253,10 @@ test('get program accounts', async () => {
|
||||
url,
|
||||
{
|
||||
method: 'getProgramAccounts',
|
||||
params: [programId.publicKey.toBase58(), {commitment: 'recent'}],
|
||||
params: [
|
||||
programId.publicKey.toBase58(),
|
||||
{commitment: 'recent', encoding: 'binary64'},
|
||||
],
|
||||
},
|
||||
{
|
||||
error: null,
|
||||
@ -1659,7 +1662,10 @@ test('request airdrop', async () => {
|
||||
url,
|
||||
{
|
||||
method: 'getAccountInfo',
|
||||
params: [account.publicKey.toBase58(), {commitment: 'recent'}],
|
||||
params: [
|
||||
account.publicKey.toBase58(),
|
||||
{commitment: 'recent', encoding: 'binary64'},
|
||||
],
|
||||
},
|
||||
{
|
||||
error: null,
|
||||
|
@ -22,7 +22,7 @@ const expectedData = (authorizedPubkey: PublicKey): string => {
|
||||
const mockNonce = new Account();
|
||||
mockNonce.publicKey.toBuffer().copy(expectedData, 40); // Hash, 32 bytes
|
||||
expectedData.writeUInt16LE(5000, 72); // feeCalculator, 8 bytes
|
||||
return bs58.encode(expectedData);
|
||||
return expectedData.toString('base64');
|
||||
};
|
||||
|
||||
test('create and query nonce account', async () => {
|
||||
|
Reference in New Issue
Block a user