Skip to content

Commit

Permalink
Fixed renamed field infoURI
Browse files Browse the repository at this point in the history
  • Loading branch information
marcvelmer committed Aug 22, 2024
1 parent ab4042d commit 51a84ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/api/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface IAccountInfoResponse {
/**
* The information URI of the account
*/
infoURI?: string;
infoURL?: string;

/**
* The metadata of the account
Expand Down
4 changes: 2 additions & 2 deletions src/services/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ type AccountServiceParameters = ServiceProperties & AccountServiceProperties;
* @property {number} balance
* @property {number} nonce
* @property {number} electionIndex
* @property {string | null} infoURI
* @property {string | null} infoURL
* @property {Account} account
*/
export type AccountData = {
account: Account;
} & Pick<
IAccountInfoResponse,
'address' | 'balance' | 'nonce' | 'electionIndex' | 'infoURI' | 'sik' | 'transfersCount' | 'feesCount'
'address' | 'balance' | 'nonce' | 'electionIndex' | 'infoURL' | 'sik' | 'transfersCount' | 'feesCount'
>;

export type ArchivedAccountData = Pick<AccountData, 'address' | 'account'>;
Expand Down
6 changes: 3 additions & 3 deletions test/integration/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Account integration tests', () => {
expect(accountInfo.address).toEqual(strip0x(walletAddress).toLowerCase());
expect(accountInfo.balance).toBeGreaterThan(0);
expect(accountInfo.electionIndex).toEqual(0);
expect(accountInfo.infoURI).toEqual('ipfs://bafybeigv4mfmn3tyusbwmskfn6xhoyvv2i2svdq7pns6dphdivefr62k3q');
expect(accountInfo.infoURL).toEqual('ipfs://bafybeigv4mfmn3tyusbwmskfn6xhoyvv2i2svdq7pns6dphdivefr62k3q');
expect(accountInfo.nonce).toEqual(0);
}, 75000);
it('should bootstrap a new account using a raw faucet package payload', async () => {
Expand Down Expand Up @@ -63,7 +63,7 @@ describe('Account integration tests', () => {
],
}),
});
expect(account.infoURI).toEqual('ipfs://bafybeigut3hara5spqfqgxrzlwjj7cp4avvdmcir4jdxaoyg3zlyfjdmfi');
expect(account.infoURL).toEqual('ipfs://bafybeigut3hara5spqfqgxrzlwjj7cp4avvdmcir4jdxaoyg3zlyfjdmfi');
expect(account.account.languages).toStrictEqual(['es']);
expect(account.account.name).toStrictEqual({
es: 'test',
Expand Down Expand Up @@ -120,7 +120,7 @@ describe('Account integration tests', () => {
],
})
);
expect(account.infoURI).toEqual('ipfs://bafybeig3a7hb2nmjrppwk2ywcalbiliakvkuckerr57aoicez5nwk6vsh4');
expect(account.infoURL).toEqual('ipfs://bafybeig3a7hb2nmjrppwk2ywcalbiliakvkuckerr57aoicez5nwk6vsh4');
expect(account.account.name).toStrictEqual({
es: 'test2',
asdasdsad: 'test2',
Expand Down

0 comments on commit 51a84ea

Please sign in to comment.