Skip to content

Releases: AmbireTech/ambire-common

v2.32.0

27 Nov 16:44
db7db29
Compare
Choose a tag to compare

Changelog:

  • Added: Deploy smart contracts #935
    • Enable contract deploy through EOA and SA. For estimation / simulation we change the call from to undefined to the singleton factory. For SA deploy, we deploy via the singleton factory.
    • Implement module-specific error handling to prevent crashes in the estimation or on the FE caused by unhandled errors from the humanized
  • Added: 4337 on Ethereum and Polygon #1110
    • add a checkbox in settings that allows the user to force change his network settings to 4337
    • add a force4337 network setting option
    • fix all broadcast issues to make this possible
  • Added: Switch account action (some whitelisted dApps should be able to send requests to all accounts in the extension, unlike most, which only have access to the selected account) #1046
  • Added: An old (deprecated) smart account banner warning #1128
  • Added: Option to add Swap & Bridge "Receive" token by address (needed since we opted in to retrieve the shortlist of receive tokens only) #1120
  • Added: Cache for 4h Swap & Bridge "Receive" token lists (caches token lists for different chain combinations (fromChainId and toChainId). This way we can 1) quickly retrieve and update the token lists without having to fetch them repeatedly from the API and 2) Tokens added to a list by address are also cached for sometime) #1123
  • Added: Support for selecting Swap & Bridge Token from the Dashboard #1118
  • Changed: errorDecoder lib and enhanced estimation error handling #1092
    • Add: errorDecoder lib- decodes all sorts of errors and converts them to a universal structure
    • Add: The foundation to reusable error handling for ethers/provider/bundler/relayer errors
    • Add: error humanizers
    • Refactor: estimation error handling- use errorDecoder and a function that humanizes decoded errors
    • Update: Bundler error handling
    • Update: Improved error message clarity with ChatGPT
  • Changed: Activity banner to open Benzin #1111
  • Changed: Update Balancer URL in the dApp catalog #1119
  • Changed: Improve error decoder and humanizers (error humanizers no longer do exact matches, instead, they check if the reason OR error message includes a substring) #1122
  • Changed: Include all user portfolio tokens (> $0) on the selected Receive network in the Swap & Bridge "Receive" (to) tokens #1116
  • Change: RBF condition (mark an accountOp as RBFed only if there is another accountOp that we know of with the same nonce; otherwise, let the txn be marked as stuck in mempool) #1131
  • Changed: Portfolio call timeouts (Currently, we await velcro/cena requests, no matter how long they take. This can make the app sluggish while it has no problems operating without them (storage hints and cached prices). To fix that this PR implements a timeout for both requests.) #1125
  • Fixed: Portfolio slow loading state (was caused by the fact that #setNetworkLoading always changed the values of the latest state) #1117
  • Fixed: Resolving of Batched Routes #1112
    • Fixed: Built in swap: When a bigger batch is successfully signed, there are still Proceed notification in Dashboard and built-in swap even if tx was executed
    • Added network name to the bridge banners on the Dashboard
  • Fixed: Attempt to fix portfolio fee tokens #1124
  • Fixed: Disable 4337 for all accounts that aren't on our latest factory #1127
  • Fixed: Misleading significant balance decrease warning when depositing in AAVE #1129
  • Fixed: Humanizer: Fix case 0 out amount uni v3 swap #1115

Full Changelog: v2.31.1...v2.32.0

v2.31.1

22 Nov 16:32
a139a17
Compare
Choose a tag to compare

Changelog:

  • Fixed: Native token did not appear as an available option in Sign Account Op custom networks op (resulting in custom networks being unusable) #1113

Full Changelog: v2.31.0...v2.31.1

v2.31.0

21 Nov 15:47
fc69406
Compare
Choose a tag to compare

Changelog:

  • Added: Defi Positions #1062
    • Add: defiPositions controller and lib helpers
    • Add: Uni v3 and Aave v3 provider libs
    • Add: defi position error banners
    • Add: new contracts
  • Added: SelectedAccountController #1081 and #1089
    • Introduced a new ctrl called: SelectedAccountController
    • Init SelectedAccountController into the MainController
    • selectAccount logic moved from the AccountsController to the MainController
    • Implemented selectedAccount.portfolio
    • Implemented selectedAccount.defiPositions
    • swapAndBridge - get portfolio tokens from selectedAccount instead of relying on the FE to update them
    • removed portfolioView and moved the logic to libs/selectedAccount
    • SelectedAccountPortfolio interface imrovements
    • Throttled the selectedAccount portfolio updates for a better performance
  • Added: Humanizer: Add getLink (allows the humanizer to return clickable elements to the FE that redirect to specific links) #1086
  • Added: Humanizer ascii module #985
  • Added: AAVE token information to position assets #1104
    • added new optional sub structure `protocolAsset in PositionAsset
    • added aave asset info in the return structure of AAVE deployless contract
  • Changed: Humanizer: Aave humanization and humanizerInfo logos update #1085
    • Added contract addresses and logos to humanizerInfo.json
    • updated metamask logo and contract unfo fetching to use master branch of their repo instead the old tag 2.5.0
    • Minor changes to Aave humanization, we now display the address of the contract the user is interacting with
  • Added: AMBIRE_V1_QUICK_ACC_MANAGER constant #1082
  • Added: Enable DeFi Tokens Sending #1091
    • Add back the defi tokens to the selectedAccount.portfolio tokens list
    • add isDefiToken to token.flags for each portfolio token that is also in defiPositions
  • Added: stETH/wstETH as a fee token #1106
    • Use all the fee tokens in the estimation even if they are 0 in amount
  • Changed: Save account state errors in state, instead of emitting error in the accountAdder #1088
  • Changed: Refactor Swap and Bridge banners #1090
  • Changed: Humanizer: 1inch and deadline update #1093
  • Changed: Optimize DefiPositionsController #1095
    • made defiPositions private in the MainController
    • impl defiPositionsBanners in selectedAccount
    • removed defiPositions.banners because these banners were specific for the selectedAccount only
  • Changed: Refactor Portfolio and DeFi state initialization and network data removal #1097
    • Removed unnecessary forceUpdates
    • Reduced emitUpdates on network removal- before we updated the portfolio and defi positions which is not needed as we can only remove the network keys from state
    • Reduced initial emitUpdates- instead of emitting and update for each network after changing the state to loading = true we change all networks to loading and emit a single update
  • Changed: Call eth_gasPrice to check for a minimum to compare for gas prices on non-1559 networks #1074
  • Changed: Optimize Portfolio #1098
    • Change the portfolio's latest and pending from a public to a private state in the controller to improve the performance of serializing and deserializing the portfolio state when sending it to the FE
    • added 2 new functions to the PortfolioController for retrieving the state of a given account
    • calculateSelectedAccountPortfolio fixes and improvements
  • Changed: Optimize Portfolio Banners #1101
    • Calc banners only for the selected account in the selectedAccount ctrl instead of calculating banners for all accounts and filtering them on the FE. This reduces the amount of data to be sent to the FE on each portfolio update.
    • Reduce the amount of getters in the portfolio because they are no longer needed. This is also a small performance optimization because it decreases the amount of data iterations on each portfolio update
  • Changed: Separate call to action for "in progress" and "completed" bridge banners #1102
    • Changed: Separates call to action for "in progress" and "completed" bridge banners, so they can be differently handled in #3249
    • Fixed: Dep cycle between the ActionsController and the banners lib (by extracting the common action types in an interface.
    • Changed: "Got it" to "Close" for the "completed" bridge banner.
  • Changed: Refactoring DeFi positions tokens #1105
    • total balance refactoring
    • portfolio tokens calculation refactoring
  • Changed: Temporarily request the shortlist for the Swap & Bridge to token list #1107
    • Fixed: The long list for some networks is HUGE (e.g. Ethereum has 10,000+ tokens), making this controller's serialization and deserialization computationally expensive, which ultimately affects the performance (we measured huge list resulting from 1.6MB to 2MB+ that get json.stringify-ed and then json.parse-d). So using the shortlist now.
    • Changed: Manually set the $WALLET token at the top of the "to" lists for the Ethereum and Base networks.
  • Fixed: If the last txn on a network fails and the nonce does not move, we enter infinite estimation; this is fixed by making sure we're comparing the nonce to a previously successful transaction #1083
  • Fixed: Humanizer: Swap and bridge fixes #1079
  • Fixed: Prevent the Dashboard from going into a loading state when the portfolio is automatically updated in the background #1096
  • Fixed: after a networkUpdate, the state remained uncleared (dirty), causing issues when the updateNetwork function was called a second time for another network #1094
  • Fixed: Humanizer swap edge case #1099
  • Fixed: Bug fixes in multiple controllers and UX improvements #1103
    • Add: portfolioAdditional minUpdateInterval check
    • Fix: Account select screen bricks after changing from an account to Vitalik and then to another account
    • Fix: portfolio network state not set back to loading on update
    • Fix: swapAndBridge emits an unnecessary amount of updates on selectedAccount updates
    • Fix: swapAndBridge displays No tokens on account change (no loading state)
    • Fix: old portfolio and defiPositions banners are displayed for a few seconds after changing the selected account
    • Fix: networks with errors in portfolio and defiPositions banners were updated one by one after a network goes from isLoading true -> false
    • Refactor: got rid of #prepareState in portfolio and defiPositions because of the added complexity and the fact that it's really easy to miss errors. Also, if isLoading is set to true by prepareState we can't skip updates if isLoading=true because isLoading will always be true
  • Fixed: Two updateAccountState calls on account import #1108

Full Changelog: v2.30.0...v2.31.0

v2.30.0

07 Nov 15:50
db779dd
Compare
Choose a tag to compare

Changelog:

  • Added: Humanizer: Add methods for Socket and AAVE #1072
  • Added: Paymaster step #1065
    • a timeout of 8s before declaring the paymaster request a failure (ask the user to retry)
    • an isSignRequestStillActive to query the application state from in-memory and understand whether the user has rejected the request while waiting for the paymaster response
    • another sign status: WaitingForPaymaster
  • Changed: Make estimateEOA not required #1078
  • Changed: Allow manually hiding the activity banner #1060
  • Fixed: min 1 gwei for gasPrice (The problem with SEI network was that sometimes there were no transactions in the last block, making our calculation 0 for gas price) #1073
  • Fixed: Swap & Bridge glitches #1059 and #1075
    • Fixed: Continuous "Failed to fetch routes for this pair" error thrown when updating the quote for swapping (not bridging) tokens
    • Approval bugs AmbireTech/ambire-app#3114
  • Fixed: Update Swap & Bridge "from" token with the latest from portfolio tokens #1076
    • Fixed: Updates from token when the selected account gets changed
    • Fixed: Updates from token amount if the currently selected account receives or sends the token in the meantime.
  • Fixed: Update swap or bridge route status to "in progress" before polling txn id (that could be slow) #1080

Full Changelog: v2.29.0...v2.30.0

v2.29.0

04 Nov 16:07
6dcbf89
Compare
Choose a tag to compare

Changelog:

  • Added: A delete Saved Seed method in the KeyStore controller #1050
  • Added: ETH Sofia NFT contract #1041
  • Added: Methods to store a seed temporarily #1056
  • Added: Legends: Humanizer: add new legends nft addresses #1063
  • Added: Legends: Humanizer: Module fix and add orc warrior #1066
  • Changed: Better (more user friendly) Relayer error messages when something goes wrong with the Relayer #1051
  • Changed: If there's a cached txnId in the accountOp, use it (Usually, we make a call to the relayer to fetch the txnId. That's okay. But if for some reason the Relayer cannot return the txnId at the moment (it's not working), we can try to fetch the txn from the blockchain with the currently cached txnId) #1054
  • Changed: Reduce get account state calls #1049
    • Fetch only the state of newly imported accounts, instead of fetching the account state of all accounts when new accounts are imported.
    • Fetch account state on account select
    • Allow concurrent actions
  • Changed: Improve / Swap & Bridge Error Handling on the Sign Account Op Screen #1057
    • When swapping or bridging with a BA that requires approval, two transactions are queued: one for the approval and another for the actual swap or bridge. Previously, if the user attempted to select the second transaction before approving the first, the estimation error message was poorly presented.
    • Remove redundant swap or bridge userRequest if the user deletes the approval request while both requests are still pending
  • Changed: Clean-up ambire-common (obsolete) dependencies #1058
    • Changed: Remove the adex-protocol-eth dependency and ref the ERC20 ABI incoming from there from the complied contract's IERC20 ABI (which is the same ERC20 transfer needed).
    • Changed: Remove the obsolete ambire-constants dep.
    • Fixed: The application logic does not rely on @jest/globals and @ungap/structured-clone, they are dev dependencies only.
  • Changed: Higher L2 fees (to overcome the transaction underpriced problem) #1067
  • Changed: Enhance Bridge & Swap banners texts and call to actions #1068
    • Changed: More precise titles and descriptions when swapping vs bridging (instead of common)
    • Fixed: "Proceed to next step" button only when bridging, otherwise, "Open"
    • Changed: When swap is in progress, instead of the reject action (since it can't be rejected), display a "close" button that closes the banner #1071
  • Changed: Improve a tiny bit most common swap and bridge API fail cases - unable to retrieve token list or to fetch a route #1070
  • Fixed: Open Benzin upon broadcasting the transaction, not confirming #1055
  • Fixed: Duplicated ETH token in the Swap & Bridge receive list #1064
  • Fixed: Token discovery by trace call (return all contract addresses from debug_traceCall as erc20s, we filter them afterwards with get_balances) #1069

Full Changelog: v2.28.0...v2.29.0

v1.0.24

29 Oct 15:11
3ac5e12
Compare
Choose a tag to compare

Changelog:

  • Fix for String Conversion in fetchAllSupplementTokenData to Prevent Function Call Failure #1043

v2.28.0

28 Oct 13:58
f88b12e
Compare
Choose a tag to compare

Changelog:

  • Added: Keystore send seed to UI #1042
  • Changed: Pass flow query param to /email-vault/confirm-key/ #1040
  • Changed: Enhanced the Session class and DappsController to resolve the issue where the extension couldn’t reconnect to open dApps after the service worker reactivates #1045
  • Fixed: Check for permit on erc20 typed message humanizer module #1039
    • in the humanizer typed message permit module we used to check if properties are present by simply evaluating them, but if, for example nonce was 0 we would consider it as absent.
    • This fixes erc20 permit typed message when nonce = 0 (on first permit for this contract)
  • Fixed: Duplicated native token if an ERC20 representation is a custom token #1035
  • Fixed: Broken hex signing because of legends humanization issue (missed case) #1044
  • Fixed: Transfer tests (The test account no longer has the required tokens. This PR changes the test account and modifies the tests slightly) #1047
  • Fixed: Several users reported that the Benzin screen wasn’t hiding when a new transaction was added, specifically when the action needed to be queued. This happened when a new transaction was batched and added to an existing accountOp action. Fixed this by removing the logic that prevents the Benzin action from being removed after adding an action with executionType = 'queue'. Now, regardless of the action type, the Benzin action will always be removed as expected #1048

Full Changelog: v2.27.0...v2.28.0

v2.27.0

21 Oct 16:07
d765111
Compare
Choose a tag to compare

Changelog:

  • Added: Legends humanization #1028 for
    • invite action for legends
    • link action for legends
    • spin wheel of fortune legends
    • mint nft with image - legends
  • Added: Is bold to humanizer labels (used to legends character names) #1029
  • Added: RELAYER_EXECUTOR_ADDRESSES (the relayer uses two addresses to broadcast txns, but in the extension we have only hardcoded one of them as FEE_COLLECTOR which, conceptually, is not exactly the same) #969
  • Added: Humanizer: Singleton factory #1031
  • Added: Humanizer: legends plaintext humanizer for linking message #1030
  • Added: Two additional Socket humanizaitons #1033
  • Added: Swap and Bridge controller #1005 and #1037
    • Initially setting up the swap and bridge form with the necessary data.
    • Managing form state for token swap and bridge operations (including user preferences).
    • Fetching and updating token lists (from and to).
    • Fetching and updating quotes for token swaps and bridges.
    • Manages token active routes
  • Changed: Disable estimateGas for smart accounts on Ethereum #1024
  • Changed: Overwrite hasRelayer on #load in networks ctrl #1025
  • Changed: More user friendly error message for insufficient privileges #1027
  • Changed: Better preVerificationGas estimation #1032
    • when doing 4337 estimation, prioritize the gas tank commitment for the estimation as that brings a bigger preVerificationGas to the table. Previously, the paymaster refused the txn as we prioritized a fee token approval for ambire-app estimation which resulted in lower preVerificationGas compared to the gas tank commitment done on the relayer's paymaster estimation
    • bigger numbers for gas tank / approvals for better preVerificationGas
  • Changed: Account export-import improvements #1020
    • rename everywhere "default" seed to "saved" seed
    • pass the private key to the FE through a channel, not the state
  • Changed: Humanizer: Uniswap replace 'for at least' -> 'for' #1036
  • Changed: Delete extraNetworks and add network helpers #1038
  • Fixed: If the base fee of the prev block is 0, fallback to gas price #1016
  • Fixed: Bundler estimation fee (when doing a bundler estimation, calculate the fee call twice as more often than not, one time is not bringing good enough results) #1034

Full Changelog: v2.26.0...v2.27.0

v1.0.23

04 Oct 14:33
Compare
Choose a tag to compare

Changelog: update adex commit

v1.0.22

04 Oct 14:10
30500ff
Compare
Choose a tag to compare

Changelog: Fix / sei network missing in supportedProtocols