Skip to content

Commit

Permalink
chore: version bump (#483)
Browse files Browse the repository at this point in the history
* chore: version bump
  • Loading branch information
joepegler authored Apr 29, 2024
1 parent b44a7bf commit c06a8d4
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 24 deletions.
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# @biconomy/account

## 4.2.0

### Minor Changes

- Features:

- Improved getBalances utility helper ([da340f](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/da340fbcc20778c9810dd8980061a6bb7b4cf097))
- Added 1271 Signature support ([fd832fe](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/fd832fe2e286a5d3e57d3292cfa395e388b07b96))
- Added withdrawal utility helper ([7a93d87](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/7a93d871ecefbce8ed5ef63349c055072877189e))
- Reduce bundle size ([7c594fa](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/7c594fa74e81650b4cb5043afb4cd1153e638a19))
- Integrate [AAErrors](https://github.com/bcnmy/aa-errors) ([7c594fa](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/7c594fa74e81650b4cb5043afb4cd1153e638a19))
- Added 6492 Signature support ([fd832fe](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/fd832fe2e286a5d3e57d3292cfa395e388b07b96))
- Added Token Balances to getSupportedTokens payload ([869436](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/8694366165208cac6bbf7e560fe2abefce0eaa3a))
- Added gas estimates utility helper ([950a521](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/950a521af63d7a719edcbae4df57259d3fe110e7))
- Added dummy pnd override ([8d34d14](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/8d34d148862510fdb76c58852c55a48bc7c20b4c))

Chores:

- Modernise tooling ([7c594fa](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/7c594fa74e81650b4cb5043afb4cd1153e638a19))
- Add changesets
- Migrate tests to Amoy
- Add pr lint
- Add size report
- Add tree shaking
- Add code of conduct
- Update README (table of contents)
- Add SECURITY.md
- Replace prettier with biome
- Replace yarn with bun
- Remove deprecated Base class
- Added "NEXT_PUBLIC_BICONOMY_SDK_DEBUG" to support NextJS debugging information
- Replace jest with vitest
- Added size threshold checks to PRs
- Added test coverage checks to PRs
- Added tsdoc auto-deploy

Fixes:

- Fix wrong falsy check for user op nonce ([f2567](https://github.com/bcnmy/biconomy-client-sdk/pull/479/commits/f256712bbf7dc0de40b82c70ad183c59bf5f39f9))

## 4.1.1 (2023-07-03)

- Added missing extensions ([fdbec6](https://github.com/bcnmy/biconomy-client-sdk/pull/451/commits/fdbec68625f4d7f436dc39d4c1779cdbb7c53e6d))
Expand Down
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"sideEffects": false,
"name": "@biconomy/account",
"author": "Biconomy",
"version": "4.1.3",
"version": "4.2.0",
"description": "SDK for Biconomy integration with support for account abstraction, smart accounts, ERC-4337.",
"keywords": [
"erc-7579",
Expand Down Expand Up @@ -46,7 +46,10 @@
"default": "./_cjs/modules/index.js"
}
},
"files": ["dist/*", "README.md"],
"files": [
"dist/*",
"README.md"
],
"scripts": {
"format": "biome format . --write",
"lint": "biome check .",
Expand Down Expand Up @@ -102,7 +105,9 @@
"viem": "^2"
},
"commitlint": {
"extends": ["@commitlint/config-conventional"]
"extends": [
"@commitlint/config-conventional"
]
},
"simple-git-hooks": {
"pre-commit": "bun run format && bun run lint:fix",
Expand Down
10 changes: 5 additions & 5 deletions src/account/BiconomySmartAccountV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export class BiconomySmartAccountV2 extends BaseSmartContractAccount {
*
* const token = "0x747A4168DB14F57871fa8cda8B5455D8C2a8e90a";
* const smartAccount = await createSmartAccountClient({ signer, bundlerUrl });
* const [tokenBalanceFromSmartAccount, nativeTokenBalanceFromSmartAccount] = await smartAccount.getBalance([token]);
* const [tokenBalanceFromSmartAccount, nativeTokenBalanceFromSmartAccount] = await smartAccount.getBalances([token]);
*
* console.log(tokenBalanceFromSmartAccount);
* // {
Expand All @@ -456,7 +456,7 @@ export class BiconomySmartAccountV2 extends BaseSmartContractAccount {
*
* // or to get the nativeToken balance
*
* const [nativeTokenBalanceFromSmartAccount] = await smartAccount.getBalance();
* const [nativeTokenBalanceFromSmartAccount] = await smartAccount.getBalances();
*
* console.log(nativeTokenBalanceFromSmartAccount);
* // {
Expand All @@ -468,7 +468,7 @@ export class BiconomySmartAccountV2 extends BaseSmartContractAccount {
* // }
*
*/
public async getBalance(
public async getBalances(
addresses?: Array<Hex>
): Promise<Array<BalancePayload>> {
const accountAddress = await this.getAccountAddress()
Expand Down Expand Up @@ -586,7 +586,7 @@ export class BiconomySmartAccountV2 extends BaseSmartContractAccount {

// Get the balances of the tokens if the amount is not present in the withdrawal requests
if (shouldFetchMaxBalances) {
const balances = await this.getBalance(
const balances = await this.getBalances(
tokenRequests.map(({ address }) => address)
)
tokenRequests = tokenRequests.map(({ amount, address }, i) => ({
Expand Down Expand Up @@ -1144,7 +1144,7 @@ export class BiconomySmartAccountV2 extends BaseSmartContractAccount {

return await Promise.all(
(feeQuotesResponse?.feeQuotes ?? []).map(async (quote) => {
const [tokenBalance] = await this.getBalance([
const [tokenBalance] = await this.getBalances([
quote.tokenAddress as Hex
])
return {
Expand Down
18 changes: 2 additions & 16 deletions tests/account/read.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,27 +615,13 @@ describe("Account:Read", () => {
test.concurrent("should fetch balances for smartAccount", async () => {
const token = "0x747A4168DB14F57871fa8cda8B5455D8C2a8e90a"
const tokenBalanceBefore = await checkBalance(smartAccountAddress, token)
const [tokenBalanceFromSmartAccount] = await smartAccount.getBalance([
const [tokenBalanceFromSmartAccount] = await smartAccount.getBalances([
token
])

expect(tokenBalanceBefore).toBe(tokenBalanceFromSmartAccount.amount)
})

test.concurrent(
"should fetch only token balance for a smartAccount",
async () => {
const token = "0x747A4168DB14F57871fa8cda8B5455D8C2a8e90a"
const tokenBalanceBefore = await checkBalance(smartAccountAddress, token)
const tokenBalanceFromSmartAccount = await smartAccount.getBalance([
token
])
console.log(tokenBalanceFromSmartAccount)

// expect(tokenBalanceBefore).toBe(tokenBalanceFromSmartAccount)
}
)

test.concurrent("should error if no recipient exists", async () => {
const token: Hex = "0x747A4168DB14F57871fa8cda8B5455D8C2a8e90a"

Expand All @@ -662,7 +648,7 @@ describe("Account:Read", () => {
test.concurrent(
"should check native token balance and more token info for smartAccount",
async () => {
const [ethBalanceFromSmartAccount] = await smartAccount.getBalance()
const [ethBalanceFromSmartAccount] = await smartAccount.getBalances()

expect(ethBalanceFromSmartAccount.amount).toBeGreaterThan(0n)
expect(ethBalanceFromSmartAccount.address).toBe(NATIVE_TOKEN_ALIAS)
Expand Down

0 comments on commit c06a8d4

Please sign in to comment.