Releases: AmbireTech/ambire-common
Releases · AmbireTech/ambire-common
v2.38.0
Changelog:
- Added:
onLoad
method in main ctrl #1202 (needed for AmbireTech/ambire-app#3707) - Added: Get AAVE v3 positions on Scroll (defi positions) #1203
- Added: Humanizer: ENS #1205
- Added: Biconomy as an available bundler #1200 This is how the bundler system looks like from this PR onwards:
- Both bundlers available, pimlico main: Base, Arbitrum, Polygon
- Both bundlers available, biconomy main: Optimism
- Only pimlico: Ethereum, Avalanche, Scroll (Biconomy doesn't support these) and all custom networks (more work needed for this, maybe one day)
- We introduce a fallback mechanism for the bundler. If a 400 error or an internal error is encountered using Biconomy, we switch to Pimlico. If an internal error is found on Pimlico, we switch to Biconomy. Switch settings apply for the duration of the sign account op screen and persist for that
accountOp
if broadcast is successful but reset to defaults for a new sign account op request - In
SubmittedAccountOp
, we write the bundler used inidentifiedBy
and we use it to query the status of the user op. Benzina is also made to work accordingly
- Added: Humanizer: more Lido methods #1215
- Changed: Run Unit tests against NodeJS v22.x (to be in sync with the extension v) #1201 and #1207
- Changed: Clear Dashboard filter on lock #1214
- Changed: Improve portfolio error banner UX #1190
- Add:
selectedAccount
banner tests- the logic is quite complicated and we didn't have any test cases which is why I added some - Change: Display a portfolio error banner only if there isn't a successful update in the last 10 minutes or if the user force updates the portfolio
- Change: Display defi position error banners only if there isn't a successful update in the last 10 minutes and ONLY for networks and providers the user has positions on (force update isn't a trigger here)
- Update: Portfolio lib error structure to contain
level
as some errors are critical to the response (velcro error), some are important (portfolio price error) and some should only be stored for DX (individual token errors)
- Add:
- Changed: Sort Swap & Bridge "From" and "Receive" token lists by highest balance (in USD) first #1206
- Changed: Handle hidden tokens in the Swap & Bridge token lists (Hidden tokens 1) Won't be displayed in the "From" token list and 2) They won't be added to the "Receive" token list as additional tokens from the portfolio (example: hiding SKYA token on Base), BUT 3) They will STILL appear in the "Receive" list if they are present in service provider's to token list (example: hiding cbBTC on Base) #1213
- Fixed: Significant balance decrease warning doesn't count hidden tokens #1204
- Fixed: Swap & Bridge normalize incoming Socket tokens in (active) routes (was causing troubles for the parts that expect normalized addresses like the token icons logic) #1209
- Fixed: Raw major error from
main.traceCall
#1208- Fix: traceCall throws two errors if
debug_traceCall
is not supported becauseawait provider.send('debug_traceCall'
is caught indebugTraceCall
. Is there any point in catching it? - Add:
rpcError.error?.message
as a possible error reason (this was needed in 575fd54 but is a good change so I left it anyway) - Add: Wrap
traceCall
in try catch
- Fix: traceCall throws two errors if
Full Changelog: v2.37.1...v2.38.0
v2.37.1
Changelog:
- Fixed: Sign Account Op screen (and extension) freeze upon a sign or broadcast error (ensure
signAccountOpBroadcastPromise
andsignAccountOpSigningPromise
are properly resolved even when an error occurs) #1211
Full Changelog: v2.37.0...v2.37.1
v2.37.0
Changelog:
- Added: Retry the paymaster 3 times automatically before declaring it a failure and asking for a manual retry from the user #1189
- Added: Simulation:
debug_traceCall
: make mint and burn simulation possible #1087 - Added: Ambire-readable operation #1195 A v2 smart account can be a signer to a v1 account with the changes below (E2E implementation yet to be completed).
- add an AmbireReadableOperation for recognizing when a request for a v1 operation is taking place
- when signing an AmbireReadableOperation, below the hood we actually sign an AmbireOperation
- do not allow AmbireOperation sign if the AmbireReadableOperation's address is the same as the signer (v2) addr
- Added: Humanizer: hidden calls inside a call to the current account (the methods
tryCatch
,tryCatchLimit
,executeBySelf
,executeBySelfSingle
(andsetAddrPrivilege
) can be executed without a signature if the contracts calls itself which is done if the method call is requested as a normal contract call. We used to not display the inner calls) #1194 - Changed: Deployless timeout to 5000ms for Invictus RPCs and 15000ms for custom ones #1183
- Changed: NFT already minted human-readable error #1185
- Don't remove ERC20: prefix from errors. That was needed before as we were doing strict comparisons and the prefix was returned arbitrarily
- Humanize NFT already minted
- Changed: Simulation: prioritize enumerable data #1179
- Changed: Improve error humanization #1188
- Add CustomError error decoder
- Update generic errors
- Handle more error reasons
- Update
The transaction cannot be estimated because
toThe transaction will fail because
- Fix
toUtf8String
throws an error
- Changed: Min $10 balance to use the Gas Tank #1198
- Fixed: Unable to open the popup window due to opened action window (When the account is changed while there is a pending action like signAccountOp and when on the new account one tries to open the popup window it does not work because there is a minimized action window that can not be automatically opened because the action for the window is filtered out for the newly selected account) #1187
- Fixed: Legends: linking humanizer #1191
- Fixed: Add sponsorship for the correct user req as there was a bug: was sponsorship was added to an userReq, if that user req was queued for later and another user req on a diff account was added, sponsorship appeared on it (if conditions were met, of course, but still, it shouldn't appear) #1196
- Fixed: Humanizer: some hardcoded function selectors #1197
- Fixed: Humanizer: recursively hidden calls inside execute calls explot #1199
Full Changelog: v2.36.2...v2.37.0
v2.34.1
v2.36.2
Changelog:
- Fixed: There was an issue in the dApps getter where
predefinedDapps
andcustomDapps
were improperly reduced into a final list. As a result, some custom dApps were excluded from the final dApps list, leading to connection problems with these missing dApps #1186
Full Changelog: v2.36.1...v2.36.2
v2.36.1
v2.36.0
Changelog:
- Added: Custom networks paymaster #1162
- add EURe as a fee token on gnosis
- remove gnosis as a predefined network
- fix "txn underpriced" errors - they were hidden
- enable paymaster support for custom networks if the paymaster has balance
- enable a fallback mechanism if the user op is declined by "insufficient paymaster funds" - disable it until a higher amount in the paymaster is found (the pasmaster has been topped up)
- Added: Humanize
0x7b36c479
(estimation error) #1172 - Added: Legends to dApp catalog #1177
- Changed: Allow relayer broadcast for BNB and other relayer networks #1167
- Changed: Improve RPC error handler decoding success #1173
- Changed: Handle better the Stargate v2 bridge and its protocol fee #1174
- Fixed: It turned out that the Stargate v2 bridge sometimes requires protocol fee in native (similar to Stargate v1), so include this bridge too in the insufficient native funds to cover the fee checks.
- Fixed: In case bridging between the same token as the protocol fee one (native), subtract the bridged amount when checking if the token is enough.
- Changed: Alter the error text a bit (in sync with "insufficient funds" one of the sign account op):
- Changed: Exclude the same token when swapping in the Swap & Bridge "Receive" list #1178
- Changed: Improve estimation for slow requests #1169 and #1180 Add a timeout limit:
- 3.5s to pimlico estimate gas prices
- 3.5s to standard gas price call (provider.getBlock())
- 5s to estimate requests (estimate gas, estimate deployless, bundler estimate)
If the timeout is reached, it retries each request 5 times and then it declares a failure
- Changed: A better error message for preVerificationGas not enough #1182
- Changed: Portfolio hints banner improve UX and clean up hints logic #1149
- Logically separate hints- from external API and additional hints, instead of adding learned NFTs to previousHints
- Only display a portfolio error banner if fallback hints(from storage) are missing or older than 10 minutes
- Don't store empty structures in storage. We used to store empty hints for networks, unsupported by velcro, instead of not storing anything. This PR changes that- hints will only be stored if there is a successful call to velcro
- Improves naming and adds docs
- Fixed: SignAccountOp Updates While Signing or Broadcasting #1168
- Prevent the signAccountOp from being replaced with another signAccountOp while the previous one is still in the signing or broadcasting process. Now the new request will await the completion of the previous signAccountOp to finish and be destroyed properly before being added as an action
- Fixed: FE state on op activator call #1176
- a bug with the edge case where the once time nonce failed to compute because of missing paymaster data
- also fix the FE state when performing the edge case
- Fixed: Swap & Bridge quotes throttling and bounces of state statuses when typing the from amount #1175
- Fixed: Transactions are not deleted from Ambire action window when user rejects them in built in swap window #1181
- Added removeActiveRoute function to the MainController (when called the active route and all related userRequests will be removed)
- Fixed: Update
networksWithAccountStateError
onmain.removeNetwork
(accountAdder) #1171
Full Changelog: v2.35.0...v2.36.0
v2.35.0
Changelog:
- Fixed: Humanizer: Staking $WALLET #1161
- Fixed: Swap & Bridge "from" token entered amount gets reset on every portfolio update (but it shouldn't) #1160
- Fixed: Throw an error if Ambire v1 account is trying to sign a message on unsupported network #1164 and an unit test #1166
- Fixed: Humanizer: Legends: Linking account humanization #1165
- Fixed: Basic Account estimation error due to a pending approval #1163
- Added: 'waiting-approval-to-resolve' routeStatus
- Changed: Do not build both approval and swap or bridge tx at the same time to prevent bugs - first build the approval tx and when confirmed build the swap or bridge tx
- Fixed: Getting the status of a route for smart accounts flow against unconfirmed transaction ID
- Previously, the routeStatus was updated after signing a transaction in resolveAccountOpAction within the main function. However, with smart accounts, this approach caused issues because the relayer would modify or batch the transaction with others, resulting in a different txnId. This mismatch led to errors in Socket, as the incorrect txnId was passed, preventing proper status updates for some routes indefinitely.
- Now, all routeStatus updates for the whole lifecycle of the activeRoute occur after receiving updates in the SubmittedAccountOp from the activity controller. This logic has been consolidated into a single function, making the update process for activeRoutes more robust, less prone to errors, and easier to maintain.
- Fixed: Exclude routes with protocol fees for which the user does not have sufficient funds to pay #1145
- We decided not to exclude routes requiring a native fee when the account has no native balance. Instead, we will show an error message for these routes. The message will explain why the user can’t continue with the selected route and how he can resolve the issue. This error will appear in the swap& bridge form
- Currently we do the checks only for these bridge protocols because we do not have a dynamic way of getting from Socket API which ones require contract fees:
['stargate', 'arbitrum-bridge', 'zksync-native']
Full Changelog: v2.34.0...v2.35.0
v2.34.0
Changelog:
- Added: Legends: Humanizer: add character and update spin/unlock wheel humanization #1154
- Added: Swap & Bridge warning message if a bridge pair was found but the minimum token amount was not met to continue with the bridge #1155
- Added: Error logging (dev) enhancements #1114
- Added: ERC-7677 gas sponsorship #1138
- a handle for ERC-7677 gas sponsorship
- a paymaster class to determine whether we're using sponsorship, Ambire regular paymaster, or regular broadcast
- a paymaster factory to create paymasters
- a failed sponsorships singleton so we could easily fallback to Ambire paymaster broadcast
- Changed:
pollTxnId
fail limit to 8 (when reached, returnnull
and declare failure to fetch the tx id) #1150 - Changed: Failed to Get txnId #1151, when pollTxnId fails to get the txnId:
- instead of resolving the dappPromise, reject it with a rpc.transactionRejected
- if the accountOp containes a swapAndBridge calls set an error to the respective activeRoutes
- Changed: Disable estimateGas for all except Arbitrum (otherwise, there's a giant gas overhead) #1153
- Changed: Forbid gas tank usage on an empty account #1152
- Changed: Character names in Humanizer #1158
- Fixed: Forcefully set the routeStatus to 'completed' after a successful broadcast (will help to finalize the active routes in case where getRouteStatus from SocketAPI fails) #1156 in these cases:
- when we are sure that the route is a swap only one
- when it is a bridge route and when we just signed and broadcasted the final transaction that is of type: 'swap'
Full Changelog: v2.33.0...v2.34.0
v2.33.0
Changelog:
- Added: Humanizer: WTC claim #1134
- Added: Pull (and cache for 24h) the supported Swap & Bridge chains by the Swap & Bridge API (Socket) #1126
- Added: Activity Filtration by session #1121
- Change: Updated ActivityController to filter and paginate AccountsOps and SignedMessages by sessionId. Now, different pages can apply independent filters, with their activity tied to the specific page context. This was necessary because AccountsOps will be displayed and filtered on both Settings -> Transaction History and Dashboard -> Activity tabs. Previously, applying a filter affected both places, leading to poor UX.
- Change: Streamlined the way we search for
entryPointAuthorizationMessageFromHistory
in MainController. Previously, initializing the filters was cumbersome; now, there's a simple helper function in ActivityController. - Change: Documentation updated, regarding how ActivityController is working.
- Added: Account Adder - current page error and locked states #1144
- Added: State to indicate the page requested fails to load (and the reason why)
- Added: State to indicate page being locked - to prevent requesting the next page before the current one is fully loaded (this avoids race conditions where the user requests the next page before linked accounts are fully loaded, causing misleadingly failing
#verifyLinkedAccounts
checks)
- Added: Banner action type for update-version #1146
- Changed: Preload domains #1132
- Changed: Persist Dashboard network filter #1137
- Changed: Update legends NFT contract #1061
- allow nfts to be transferred and burned if owner 'unlocked' the contract
- allow tokenURI getting on unminted nft
- store character data on mint
- Fixed: Outdated Selected Account props #1140
- Fixed: Swap & Bridge prevent the reset of the "Receive" on selectedAccountCtrl update #1142
- Fixed: Humanizer: swap and bridge humanization fix + add steth action #1141
- Fixed: ERC-5792: feedback to the dapp #1143
- resolve correctly walletSendCalls requests from the dapp;
- timeout jiffyscan at 2.5s as it's too slow and making UX worse;
- Fixed: activity.ts findMessage when empty account messages #1147
- Fixed: Error decoder and humanizer errors #1139
- Fix:
errorDecoder
decodes RPC error as relayer - Fix:
#throwBroadcastAccountOp
may emit a raw error message - Change: Display error codes for paymaster and relayer errors
- Add:
throwBroadcastAccountOp
tests tomain.test.ts
- Fix:
- Fixed: Legends: nft fixes #1148
Full Changelog: v2.32.0...v2.33.0