Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
henrye committed Dec 6, 2022
1 parent 18f361a commit 8ab5236
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ts/packages/anchor/src/program/namespace/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,10 @@ export class AccountClient<
);
const { value, context } = accountInfo;
return {
data: value && value.data.length !== 0
? this._coder.accounts.decode<T>(this._idlAccount.name, value.data)
: null,
data:
value && value.data.length !== 0
? this._coder.accounts.decode<T>(this._idlAccount.name, value.data)
: null,
context,
};
}
Expand All @@ -169,7 +170,9 @@ export class AccountClient<
async fetch(address: Address, commitment?: Commitment): Promise<T> {
const { data } = await this.fetchNullableAndContext(address, commitment);
if (data === null) {
throw new Error(`Account does not exist or has no data ${address.toString()}`);
throw new Error(
`Account does not exist or has no data ${address.toString()}`
);
}
return data;
}
Expand Down

0 comments on commit 8ab5236

Please sign in to comment.