fix: rename userdata to data

This commit is contained in:
Michael Vines
2019-03-14 13:27:47 -07:00
parent 5d40f359c2
commit 6fe0e08a80
9 changed files with 144 additions and 144 deletions

View File

@ -214,7 +214,7 @@ test('request airdrop', async () => {
0,
],
lamports: 42,
userdata: [],
data: [],
executable: false,
},
},
@ -222,7 +222,7 @@ test('request airdrop', async () => {
const accountInfo = await connection.getAccountInfo(account.publicKey);
expect(accountInfo.lamports).toBe(42);
expect(accountInfo.userdata).toHaveLength(0);
expect(accountInfo.data).toHaveLength(0);
expect(accountInfo.owner).toEqual(SystemProgram.programId);
});
@ -472,7 +472,7 @@ test('account change notification', async () => {
expect(mockCallback.mock.calls[0][0].lamports).toBe(41);
expect(mockCallback.mock.calls[0][0].owner).toEqual(BpfLoader.programId);
expect(mockCallback.mock.calls[0][0].executable).toBe(false);
expect(mockCallback.mock.calls[0][0].userdata).toEqual(
expect(mockCallback.mock.calls[0][0].data).toEqual(
Buffer.from([1, 2, 3]),
);
});
@ -534,7 +534,7 @@ test('program account change notification', async () => {
BpfLoader.programId,
);
expect(mockCallback.mock.calls[0][0].accountInfo.executable).toBe(false);
expect(mockCallback.mock.calls[0][0].accountInfo.userdata).toEqual(
expect(mockCallback.mock.calls[0][0].accountInfo.data).toEqual(
Buffer.from([1, 2, 3]),
);
});

View File

@ -95,7 +95,7 @@ test('create new token', async () => {
result: {
owner: [...SYSTEM_TOKEN_PROGRAM_ID.toBuffer()],
lamports: 1,
userdata: [
data: [
1,
16,
39,
@ -163,7 +163,7 @@ test('create new token', async () => {
result: {
owner: [...SYSTEM_TOKEN_PROGRAM_ID.toBuffer()],
lamports: 1,
userdata: [
data: [
2,
...testToken.token.toBuffer(),
...initialOwner.publicKey.toBuffer(),
@ -252,7 +252,7 @@ test('create new token account', async () => {
result: {
owner: [...SYSTEM_TOKEN_PROGRAM_ID.toBuffer()],
lamports: 1,
userdata: [
data: [
2,
...testToken.token.toBuffer(),
...destOwner.publicKey.toBuffer(),
@ -310,7 +310,7 @@ test('transfer', async () => {
result: {
owner: [...SYSTEM_TOKEN_PROGRAM_ID.toBuffer()],
lamports: 1,
userdata: [
data: [
2,
...testToken.token.toBuffer(),
...initialOwner.publicKey.toBuffer(),
@ -349,7 +349,7 @@ test('transfer', async () => {
result: {
owner: [...SYSTEM_TOKEN_PROGRAM_ID.toBuffer()],
lamports: 1,
userdata: [
data: [
2,
...testToken.token.toBuffer(),
...dest.toBuffer(),
@ -420,7 +420,7 @@ test('approve/revoke', async () => {
result: {
owner: [...SYSTEM_TOKEN_PROGRAM_ID.toBuffer()],
lamports: 1,
userdata: [
data: [
2,
...testToken.token.toBuffer(),
...delegate.toBuffer(),
@ -482,7 +482,7 @@ test('approve/revoke', async () => {
result: {
owner: [...SYSTEM_TOKEN_PROGRAM_ID.toBuffer()],
lamports: 1,
userdata: [
data: [
2,
...testToken.token.toBuffer(),
...delegate.toBuffer(),