Skip to content

Commit

Permalink
release/5.23.0 (#1371)
Browse files Browse the repository at this point in the history
* Feature/standard wallet interface (#1357)

* Feature/soroswap (#1347)

* Feature/hash signing 2 (#1303)

* flips the session store flag, updates listeners to not be intialized … (#1169)

* capture amplitude errors to better understand why they're triggering sentry (#1167)

* flips the session store flag, updates listeners to not be intialized async for v3

* updates e2e tests for manifest v3

---------

Co-authored-by: Piyal Basu <[email protected]>

* add scripts tag for Firefox (#1294)

* uses chrome storage in migrations instead of local storage

* checks for migrated account in migration logic to set migrated network

* don't babel-polyfill contentScript (#1297)

* don't clear all of localStore on recoverAccount (#1301)

* add hash signing option (ui and data storage)

* fix redux state update; show custom errors from hardware wallet

* Added translations

* when experimental mode is enabled, switch network

* PR comments

* rm logs

---------

Co-authored-by: aristides <[email protected]>

* Feature/trustline sac (#1289)

* Bump axios, @docusaurus/core and @docusaurus/preset-classic in /docs (#1244)

Removes [axios](https://github.com/axios/axios). It's no longer used after updating ancestor dependencies [axios](https://github.com/axios/axios), [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) and [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic). These dependencies need to be updated together.


Removes `axios`

Updates `@docusaurus/core` from 2.4.1 to 3.2.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.2.1/packages/docusaurus)

Updates `@docusaurus/preset-classic` from 2.4.1 to 3.2.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.2.1/packages/docusaurus-preset-classic)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@docusaurus/core"
  dependency-type: direct:production
- dependency-name: "@docusaurus/preset-classic"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump express from 4.18.2 to 4.19.2 in /docs (#1216)

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump tar from 6.1.15 to 6.2.1 (#1231)

Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.1.15...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump express from 4.18.2 to 4.19.2 (#1214)

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docs (#1208)

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump webpack-dev-middleware from 5.3.3 to 5.3.4 (#1207)

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump follow-redirects from 1.15.4 to 1.15.6 in /docs (#1198)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump follow-redirects from 1.15.2 to 1.15.6 (#1197)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump ip from 2.0.0 to 2.0.1 (#1128)

Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump axios, @docusaurus/core and @docusaurus/preset-classic in /docs (#1055)

Removes [axios](https://github.com/axios/axios). It's no longer used after updating ancestor dependencies [axios](https://github.com/axios/axios), [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) and [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic). These dependencies need to be updated together.


Removes `axios`

Updates `@docusaurus/core` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus)

Updates `@docusaurus/preset-classic` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus-preset-classic)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@docusaurus/core"
  dependency-type: direct:production
- dependency-name: "@docusaurus/preset-classic"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* first pass at adding remove dropdown

* replaces all remaining instances of wallet-sdk

* tweaks tx detail row layouts to avoid overflows

* adds getContractSpec, uses it to display parameter names in tx sign detail view

* migrates KeyManager to ts-wallet-sdk

* upgrades react and react dom types to 18

* adds react types to extension workspace, fixes type errors

* set styles for dropdown

* Added translations

* adds standalone version of getContractSpec and related helpers

* Added translations

* Added translations

* undo husky pre push comments

* Feature/p21 futurenet release (#1278)

* switch between stellar-sdk and stellar-sdk-next based on network

* increase max diff pixel ratio for playwright

* rm console

* adds tx timeout in send and swap settings

* Added translations

* tweaks tooltip text

* Added translations

* happy path for new add asset flow

* fix trustline error warning and fix naming

* Added translations

* rollback dep upgrades

* rollback changes

* rollback package-lock upgrade

* add snapshots for manage assets and send payment (#1309)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aristides Staffieri <[email protected]>

* guard against dispatching incorrect parameter (#1305)

* adds Hardware sign usage in ReviewAuth for use during invokeHostFn signing, tweaks soroban icon to not overflow in signing details (#1282)

* adds loader for hardware signing during signing (#1284)

Co-authored-by: Piyal Basu <[email protected]>

* adds sign blob error for encoding mismatch (#1300)

* fix bad merge

* [BUG] replaces all instances of pickTransfer with getTokenSpec workflow (#1312)

* replaces all instances of pickTransfer with getTokenSpec workflow

* check for transfer once token spec is confirmed

* rm unused dep

* fixes bad merge from upstream in ManageAssets

* Added translations

* remove accidental mobile4 dir addition

---------

Co-authored-by: Piyal Basu <[email protected]>

* Test/data storage (#1304)

* adds test for data storage get item

* adds tests for network migrations

* adds test for remaining migrations

* reverts bad merge from upstream

---------

Co-authored-by: Piyal Basu <[email protected]>

* [CHORE] upgrades all webpack related deps (#1307)

* upgrades all webpack related deps

* updates lock file

* updates migrations test for recent changes

* [CHORE] upgrade to docusaurus v3 (#1306)

* upgrade to docusaurus v3

* edit manifest for chrome before uploading (#1315)

* use single quotes (#1316)

---------

Co-authored-by: Piyal Basu <[email protected]>

* Fix manage assets tests (#1317)

* fix tests for new manage assets flow

* fix broken manage-assets tests

* rm unused dep

* fix e2e tests

* fix query for visible loader

* fix assets test

* selector for individual asset balance

* add better error messaging for liabilities when removing an asset (#1319)

* add better error messaging for liabilities when removing an asset

* add tests and rm sellingLiabilities

* rm more selling liabilities

* fix diff

* fix diff again

* verify params before fetching issuer info (#1320)

* add better error messaging for liabilities when removing an asset

* add tests and rm sellingLiabilities

* rm more selling liabilities

* fix diff

* fix diff again

* verify params before fetching issuer info

* test soroswap api

* pin docusaurus core to match versions

* adding soroswap tokens to swap dropdown

* split dataStorageAccess into a different file to allow for jest mocks with circular deps

* updates all references for new dataStorage path

* fix add asset padding; fix ledger trustline error; fix token-spec check (#1324)

* fix add asset padding; fix ledger trustline error; fix token-spec check

* use dynamic verified token in e2e test

* undo the hw wallet trustline error fix while I figure out how to do it properly

* revert isTokenSpec change

* better trustline error handling; fix remove token (#1326)

* starting work on bestpath

* upgrade redux toolkit (#1333)

* upgrade redux toolkit

* allow a longer timeout to account for network congestion

* styling and copy fixes

* Added translations

* upgrade soroswap sdk and break out simulation component

* Bugfix/5.20.0 qa (#1334)

* styling and copy fixes

* Added translations

* Bugfix/5.20.0 legal copy (#1337)

* legal copy changes

* Added translations

* fix go back button

* use history.goBack for go back button

* show icons for soroswap tokens and final cleanup

* remove axios and auto add the token after successful token swap

* adding comments

* enable linting

* simplify asset dropdown logic

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: aristides <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* uses key val for public keys for inflation dest and trustor fields

* adding documentation to the Soroswap methods (#1350)

* removes sentry exceptions from expected failures to fetch contract specs

* check if either asset is a soroswap token (#1353)

* making freighter-api conform to wallet standard interface

* Added translations

* Revert "Added translations"

This reverts commit 48d82d5dc96ade559f929cb353f4626f656939c2.

* update remaining api methods to match

* rm unused dep

* pr comments

* fix tests

* increase timeout

* use jest timeout

* fix test name

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: aristides <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Feature/standard wallet interface docs (#1370)

* Feature/soroswap (#1347)

* Feature/hash signing 2 (#1303)

* flips the session store flag, updates listeners to not be intialized … (#1169)

* capture amplitude errors to better understand why they're triggering sentry (#1167)

* flips the session store flag, updates listeners to not be intialized async for v3

* updates e2e tests for manifest v3

---------

Co-authored-by: Piyal Basu <[email protected]>

* add scripts tag for Firefox (#1294)

* uses chrome storage in migrations instead of local storage

* checks for migrated account in migration logic to set migrated network

* don't babel-polyfill contentScript (#1297)

* don't clear all of localStore on recoverAccount (#1301)

* add hash signing option (ui and data storage)

* fix redux state update; show custom errors from hardware wallet

* Added translations

* when experimental mode is enabled, switch network

* PR comments

* rm logs

---------

Co-authored-by: aristides <[email protected]>

* Feature/trustline sac (#1289)

* Bump axios, @docusaurus/core and @docusaurus/preset-classic in /docs (#1244)

Removes [axios](https://github.com/axios/axios). It's no longer used after updating ancestor dependencies [axios](https://github.com/axios/axios), [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) and [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic). These dependencies need to be updated together.


Removes `axios`

Updates `@docusaurus/core` from 2.4.1 to 3.2.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.2.1/packages/docusaurus)

Updates `@docusaurus/preset-classic` from 2.4.1 to 3.2.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.2.1/packages/docusaurus-preset-classic)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@docusaurus/core"
  dependency-type: direct:production
- dependency-name: "@docusaurus/preset-classic"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump express from 4.18.2 to 4.19.2 in /docs (#1216)

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump tar from 6.1.15 to 6.2.1 (#1231)

Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.1.15...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump express from 4.18.2 to 4.19.2 (#1214)

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docs (#1208)

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump webpack-dev-middleware from 5.3.3 to 5.3.4 (#1207)

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump follow-redirects from 1.15.4 to 1.15.6 in /docs (#1198)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump follow-redirects from 1.15.2 to 1.15.6 (#1197)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump ip from 2.0.0 to 2.0.1 (#1128)

Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump axios, @docusaurus/core and @docusaurus/preset-classic in /docs (#1055)

Removes [axios](https://github.com/axios/axios). It's no longer used after updating ancestor dependencies [axios](https://github.com/axios/axios), [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) and [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic). These dependencies need to be updated together.


Removes `axios`

Updates `@docusaurus/core` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus)

Updates `@docusaurus/preset-classic` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus-preset-classic)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@docusaurus/core"
  dependency-type: direct:production
- dependency-name: "@docusaurus/preset-classic"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* first pass at adding remove dropdown

* replaces all remaining instances of wallet-sdk

* tweaks tx detail row layouts to avoid overflows

* adds getContractSpec, uses it to display parameter names in tx sign detail view

* migrates KeyManager to ts-wallet-sdk

* upgrades react and react dom types to 18

* adds react types to extension workspace, fixes type errors

* set styles for dropdown

* Added translations

* adds standalone version of getContractSpec and related helpers

* Added translations

* Added translations

* undo husky pre push comments

* Feature/p21 futurenet release (#1278)

* switch between stellar-sdk and stellar-sdk-next based on network

* increase max diff pixel ratio for playwright

* rm console

* adds tx timeout in send and swap settings

* Added translations

* tweaks tooltip text

* Added translations

* happy path for new add asset flow

* fix trustline error warning and fix naming

* Added translations

* rollback dep upgrades

* rollback changes

* rollback package-lock upgrade

* add snapshots for manage assets and send payment (#1309)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aristides Staffieri <[email protected]>

* guard against dispatching incorrect parameter (#1305)

* adds Hardware sign usage in ReviewAuth for use during invokeHostFn signing, tweaks soroban icon to not overflow in signing details (#1282)

* adds loader for hardware signing during signing (#1284)

Co-authored-by: Piyal Basu <[email protected]>

* adds sign blob error for encoding mismatch (#1300)

* fix bad merge

* [BUG] replaces all instances of pickTransfer with getTokenSpec workflow (#1312)

* replaces all instances of pickTransfer with getTokenSpec workflow

* check for transfer once token spec is confirmed

* rm unused dep

* fixes bad merge from upstream in ManageAssets

* Added translations

* remove accidental mobile4 dir addition

---------

Co-authored-by: Piyal Basu <[email protected]>

* Test/data storage (#1304)

* adds test for data storage get item

* adds tests for network migrations

* adds test for remaining migrations

* reverts bad merge from upstream

---------

Co-authored-by: Piyal Basu <[email protected]>

* [CHORE] upgrades all webpack related deps (#1307)

* upgrades all webpack related deps

* updates lock file

* updates migrations test for recent changes

* [CHORE] upgrade to docusaurus v3 (#1306)

* upgrade to docusaurus v3

* edit manifest for chrome before uploading (#1315)

* use single quotes (#1316)

---------

Co-authored-by: Piyal Basu <[email protected]>

* Fix manage assets tests (#1317)

* fix tests for new manage assets flow

* fix broken manage-assets tests

* rm unused dep

* fix e2e tests

* fix query for visible loader

* fix assets test

* selector for individual asset balance

* add better error messaging for liabilities when removing an asset (#1319)

* add better error messaging for liabilities when removing an asset

* add tests and rm sellingLiabilities

* rm more selling liabilities

* fix diff

* fix diff again

* verify params before fetching issuer info (#1320)

* add better error messaging for liabilities when removing an asset

* add tests and rm sellingLiabilities

* rm more selling liabilities

* fix diff

* fix diff again

* verify params before fetching issuer info

* test soroswap api

* pin docusaurus core to match versions

* adding soroswap tokens to swap dropdown

* split dataStorageAccess into a different file to allow for jest mocks with circular deps

* updates all references for new dataStorage path

* fix add asset padding; fix ledger trustline error; fix token-spec check (#1324)

* fix add asset padding; fix ledger trustline error; fix token-spec check

* use dynamic verified token in e2e test

* undo the hw wallet trustline error fix while I figure out how to do it properly

* revert isTokenSpec change

* better trustline error handling; fix remove token (#1326)

* starting work on bestpath

* upgrade redux toolkit (#1333)

* upgrade redux toolkit

* allow a longer timeout to account for network congestion

* styling and copy fixes

* Added translations

* upgrade soroswap sdk and break out simulation component

* Bugfix/5.20.0 qa (#1334)

* styling and copy fixes

* Added translations

* Bugfix/5.20.0 legal copy (#1337)

* legal copy changes

* Added translations

* fix go back button

* use history.goBack for go back button

* show icons for soroswap tokens and final cleanup

* remove axios and auto add the token after successful token swap

* adding comments

* enable linting

* simplify asset dropdown logic

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: aristides <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* uses key val for public keys for inflation dest and trustor fields

* adding documentation to the Soroswap methods (#1350)

* removes sentry exceptions from expected failures to fetch contract specs

* check if either asset is a soroswap token (#1353)

* making freighter-api conform to wallet standard interface

* Added translations

* Revert "Added translations"

This reverts commit 48d82d5dc96ade559f929cb353f4626f656939c2.

* update remaining api methods to match

* rm unused dep

* pr comments

* fix tests

* increase timeout

* use jest timeout

* fix test name

* adding docs for standard wallet interface

* updating docs and playground

* don't use Partial type

* simplify types

* update types in guide

* rollback version

* rollback yarn.lock

* fix tests

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: aristides <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add wallet change watcher + docs (#1373)

* Feature/soroswap (#1347)

* Feature/hash signing 2 (#1303)

* flips the session store flag, updates listeners to not be intialized … (#1169)

* capture amplitude errors to better understand why they're triggering sentry (#1167)

* flips the session store flag, updates listeners to not be intialized async for v3

* updates e2e tests for manifest v3

---------

Co-authored-by: Piyal Basu <[email protected]>

* add scripts tag for Firefox (#1294)

* uses chrome storage in migrations instead of local storage

* checks for migrated account in migration logic to set migrated network

* don't babel-polyfill contentScript (#1297)

* don't clear all of localStore on recoverAccount (#1301)

* add hash signing option (ui and data storage)

* fix redux state update; show custom errors from hardware wallet

* Added translations

* when experimental mode is enabled, switch network

* PR comments

* rm logs

---------

Co-authored-by: aristides <[email protected]>

* Feature/trustline sac (#1289)

* Bump axios, @docusaurus/core and @docusaurus/preset-classic in /docs (#1244)

Removes [axios](https://github.com/axios/axios). It's no longer used after updating ancestor dependencies [axios](https://github.com/axios/axios), [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) and [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic). These dependencies need to be updated together.


Removes `axios`

Updates `@docusaurus/core` from 2.4.1 to 3.2.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.2.1/packages/docusaurus)

Updates `@docusaurus/preset-classic` from 2.4.1 to 3.2.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.2.1/packages/docusaurus-preset-classic)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@docusaurus/core"
  dependency-type: direct:production
- dependency-name: "@docusaurus/preset-classic"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump express from 4.18.2 to 4.19.2 in /docs (#1216)

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump tar from 6.1.15 to 6.2.1 (#1231)

Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.1.15...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump express from 4.18.2 to 4.19.2 (#1214)

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docs (#1208)

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump webpack-dev-middleware from 5.3.3 to 5.3.4 (#1207)

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump follow-redirects from 1.15.4 to 1.15.6 in /docs (#1198)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump follow-redirects from 1.15.2 to 1.15.6 (#1197)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump ip from 2.0.0 to 2.0.1 (#1128)

Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump axios, @docusaurus/core and @docusaurus/preset-classic in /docs (#1055)

Removes [axios](https://github.com/axios/axios). It's no longer used after updating ancestor dependencies [axios](https://github.com/axios/axios), [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) and [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic). These dependencies need to be updated together.


Removes `axios`

Updates `@docusaurus/core` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus)

Updates `@docusaurus/preset-classic` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus-preset-classic)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@docusaurus/core"
  dependency-type: direct:production
- dependency-name: "@docusaurus/preset-classic"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* first pass at adding remove dropdown

* replaces all remaining instances of wallet-sdk

* tweaks tx detail row layouts to avoid overflows

* adds getContractSpec, uses it to display parameter names in tx sign detail view

* migrates KeyManager to ts-wallet-sdk

* upgrades react and react dom types to 18

* adds react types to extension workspace, fixes type errors

* set styles for dropdown

* Added translations

* adds standalone version of getContractSpec and related helpers

* Added translations

* Added translations

* undo husky pre push comments

* Feature/p21 futurenet release (#1278)

* switch between stellar-sdk and stellar-sdk-next based on network

* increase max diff pixel ratio for playwright

* rm console

* adds tx timeout in send and swap settings

* Added translations

* tweaks tooltip text

* Added translations

* happy path for new add asset flow

* fix trustline error warning and fix naming

* Added translations

* rollback dep upgrades

* rollback changes

* rollback package-lock upgrade

* add snapshots for manage assets and send payment (#1309)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aristides Staffieri <[email protected]>

* guard against dispatching incorrect parameter (#1305)

* adds Hardware sign usage in ReviewAuth for use during invokeHostFn signing, tweaks soroban icon to not overflow in signing details (#1282)

* adds loader for hardware signing during signing (#1284)

Co-authored-by: Piyal Basu <[email protected]>

* adds sign blob error for encoding mismatch (#1300)

* fix bad merge

* [BUG] replaces all instances of pickTransfer with getTokenSpec workflow (#1312)

* replaces all instances of pickTransfer with getTokenSpec workflow

* check for transfer once token spec is confirmed

* rm unused dep

* fixes bad merge from upstream in ManageAssets

* Added translations

* remove accidental mobile4 dir addition

---------

Co-authored-by: Piyal Basu <[email protected]>

* Test/data storage (#1304)

* adds test for data storage get item

* adds tests for network migrations

* adds test for remaining migrations

* reverts bad merge from upstream

---------

Co-authored-by: Piyal Basu <[email protected]>

* [CHORE] upgrades all webpack related deps (#1307)

* upgrades all webpack related deps

* updates lock file

* updates migrations test for recent changes

* [CHORE] upgrade to docusaurus v3 (#1306)

* upgrade to docusaurus v3

* edit manifest for chrome before uploading (#1315)

* use single quotes (#1316)

---------

Co-authored-by: Piyal Basu <[email protected]>

* Fix manage assets tests (#1317)

* fix tests for new manage assets flow

* fix broken manage-assets tests

* rm unused dep

* fix e2e tests

* fix query for visible loader

* fix assets test

* selector for individual asset balance

* add better error messaging for liabilities when removing an asset (#1319)

* add better error messaging for liabilities when removing an asset

* add tests and rm sellingLiabilities

* rm more selling liabilities

* fix diff

* fix diff again

* verify params before fetching issuer info (#1320)

* add better error messaging for liabilities when removing an asset

* add tests and rm sellingLiabilities

* rm more selling liabilities

* fix diff

* fix diff again

* verify params before fetching issuer info

* test soroswap api

* pin docusaurus core to match versions

* adding soroswap tokens to swap dropdown

* split dataStorageAccess into a different file to allow for jest mocks with circular deps

* updates all references for new dataStorage path

* fix add asset padding; fix ledger trustline error; fix token-spec check (#1324)

* fix add asset padding; fix ledger trustline error; fix token-spec check

* use dynamic verified token in e2e test

* undo the hw wallet trustline error fix while I figure out how to do it properly

* revert isTokenSpec change

* better trustline error handling; fix remove token (#1326)

* starting work on bestpath

* upgrade redux toolkit (#1333)

* upgrade redux toolkit

* allow a longer timeout to account for network congestion

* styling and copy fixes

* Added translations

* upgrade soroswap sdk and break out simulation component

* Bugfix/5.20.0 qa (#1334)

* styling and copy fixes

* Added translations

* Bugfix/5.20.0 legal copy (#1337)

* legal copy changes

* Added translations

* fix go back button

* use history.goBack for go back button

* show icons for soroswap tokens and final cleanup

* remove axios and auto add the token after successful token swap

* adding comments

* enable linting

* simplify asset dropdown logic

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: aristides <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* uses key val for public keys for inflation dest and trustor fields

* adding documentation to the Soroswap methods (#1350)

* removes sentry exceptions from expected failures to fetch contract specs

* check if either asset is a soroswap token (#1353)

* making freighter-api conform to wallet standard interface

* Added translations

* Revert "Added translations"

This reverts commit 48d82d5dc96ade559f929cb353f4626f656939c2.

* update remaining api methods to match

* rm unused dep

* pr comments

* fix tests

* increase timeout

* use jest timeout

* fix test name

* adding docs for standard wallet interface

* updating docs and playground

* don't use Partial type

* simplify types

* update types in guide

* rollback version

* rollback yarn.lock

* fix tests

* add wallet change watcher + docs

* add clarifying line of copy

* fix test

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: aristides <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add isNonSSELEnabled flag and use that to block non-https tx's (#1374)

* add isNonSSELEnabled flag and use that to block non-https tx's

* rm comment

* moving isNonSSLEnabled to Advanced Settings

* moving isNonSSLEnabled to Advanced Settings (#1375)

* Feature/connect dapp warning (#1361)

* Feature/soroswap (#1347)

* Feature/hash signing 2 (#1303)

* flips the session store flag, updates listeners to not be intialized … (#1169)

* capture amplitude errors to better understand why they're triggering sentry (#1167)

* flips the session store flag, updates listeners to not be intialized async for v3

* updates e2e tests for manifest v3

---------

Co-authored-by: Piyal Basu <[email protected]>

* add scripts tag for Firefox (#1294)

* uses chrome storage in migrations instead of local storage

* checks for migrated account in migration logic to set migrated network

* don't babel-polyfill contentScript (#1297)

* don't clear all of localStore on recoverAccount (#1301)

* add hash signing option (ui and data storage)

* fix redux state update; show custom errors from hardware wallet

* Added translations

* when experimental mode is enabled, switch network

* PR comments

* rm logs

---------

Co-authored-by: aristides <[email protected]>

* Feature/trustline sac (#1289)

* Bump axios, @docusaurus/core and @docusaurus/preset-classic in /docs (#1244)

Removes [axios](https://github.com/axios/axios). It's no longer used after updating ancestor dependencies [axios](https://github.com/axios/axios), [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) and [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic). These dependencies need to be updated together.


Removes `axios`

Updates `@docusaurus/core` from 2.4.1 to 3.2.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.2.1/packages/docusaurus)

Updates `@docusaurus/preset-classic` from 2.4.1 to 3.2.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.2.1/packages/docusaurus-preset-classic)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@docusaurus/core"
  dependency-type: direct:production
- dependency-name: "@docusaurus/preset-classic"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump express from 4.18.2 to 4.19.2 in /docs (#1216)

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump tar from 6.1.15 to 6.2.1 (#1231)

Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.15 to 6.2.1.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v6.1.15...v6.2.1)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump express from 4.18.2 to 4.19.2 (#1214)

Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)

---
updated-dependencies:
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docs (#1208)

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump webpack-dev-middleware from 5.3.3 to 5.3.4 (#1207)

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump follow-redirects from 1.15.4 to 1.15.6 in /docs (#1198)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump follow-redirects from 1.15.2 to 1.15.6 (#1197)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump ip from 2.0.0 to 2.0.1 (#1128)

Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: ip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* Bump axios, @docusaurus/core and @docusaurus/preset-classic in /docs (#1055)

Removes [axios](https://github.com/axios/axios). It's no longer used after updating ancestor dependencies [axios](https://github.com/axios/axios), [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) and [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic). These dependencies need to be updated together.


Removes `axios`

Updates `@docusaurus/core` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus)

Updates `@docusaurus/preset-classic` from 2.4.1 to 3.0.1
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.0.1/packages/docusaurus-preset-classic)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: "@docusaurus/core"
  dependency-type: direct:production
- dependency-name: "@docusaurus/preset-classic"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piyal Basu <[email protected]>

* first pass at adding remove dropdown

* replaces all remaining instances of wallet-sdk

* tweaks tx detail row layouts to avoid overflows

* adds getContractSpec, uses it to display parameter names in tx sign detail view

* migrates KeyManager to ts-wallet-sdk

* upgrades react and react dom types to 18

* adds react types to extension workspace, fixes type errors

* set styles for dropdown

* Added translations

* adds standalone version of getContractSpec and related helpers

* Added translations

* Added translations

* undo husky pre push comments

* Feature/p21 futurenet release (#1278)

* switch between stellar-sdk and stellar-sdk-next based on network

* increase max diff pixel ratio for playwright

* rm console

* adds tx timeout in send and swap settings

* Added translations

* tweaks tooltip text

* Added translations

* happy path for new add asset flow

* fix trustline error warning and fix naming

* Added translations

* rollback dep upgrades

* rollback changes

* rollback package-lock upgrade

* add snapshots for manage assets and send payment (#1309)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aristides Staffieri <[email protected]>

* guard against dispatching incorrect parameter (#1305)

* adds Hardware sign usage in ReviewAuth for use during invokeHostFn signing, tweaks soroban icon to not overflow in signing details (#1282)

* adds loader for hardware signing during signing (#1284)

Co-authored-by: Piyal Basu <[email protected]>

* adds sign blob error for encoding mismatch (#1300)

* fix bad merge

* [BUG] replaces all instances of pickTransfer with getTokenSpec workflow (#1312)

* replaces all instances of pickTransfer with getTokenSpec workflow

* check for transfer once token spec is confirmed

* rm unused dep

* fixes bad merge from upstream in ManageAssets

* Added translations

* remove accidental mobile4 dir addition

---------

Co-authored-by: Piyal Basu <[email protected]>

* Test/data storage (#1304)

* adds test for data storage get item

* adds tests for network migrations

* adds test for remaining migrations

* reverts bad merge from upstream

---------

Co-authored-by: Piyal Basu <[email protected]>

* [CHORE] upgrades all webpack related deps (#1307)

* upgrades all webpack related deps

* updates lock file

* updates migrations test for recent changes

* [CHORE] upgrade to docusaurus v3 (#1306)

* upgrade to docusaurus v3

* edit manifest for chrome before uploading (#1315)

* use single quotes (#1316)

---------

Co-authored-by: Piyal Basu <[email protected]>

* Fix manage assets tests (#1317)

* fix tests for new manage assets flow

* fix broken manage-assets tests

* rm unused dep

* fix e2e tests

* fix query for visible loader

* fix assets test

* selector for individual asset balance

* add better error messaging for liabilities when removing an asset (#1319)

* add better error messaging for liabilities when removing an asset

* add tests and rm sellingLiabilities

* rm more selling liabilities

* fix diff

* fix diff again

* verify params before fetching issuer info (#1320)

* add better error messaging for liabilities when removing an asset

* add tests and rm sellingLiabilities

* rm more selling liabilities

* fix diff

* fix diff again

* verify params before fetching issuer info

* test soroswap api

* pin docusaurus core to match versions

* adding soroswap tokens to swap dropdown

* split dataStorageAccess into a different file to allow for jest mocks with circular deps

* updates all references for new dataStorage path

* fix add asset padding; fix ledger trustline error; fix token-spec check (#1324)

* fix add asset padding; fix ledger trustline error; fix token-spec check

* use dynamic verified token in e2e test

* undo the hw wallet trustline error fix while I figure out how to do it properly

* revert isTokenSpec change

* better trustline error handling; fix remove token (#1326)

* starting work on bestpath

* upgrade redux toolkit (#1333)

* upgrade redux toolkit

* allow a longer timeout to account for network congestion

* styling and copy fixes

* Added translations

* upgrade soroswap sdk and break out simulation component

* Bugfix/5.20.0 qa (#1334)

* styling and copy fixes

* Added translations

* Bugfix/5.20.0 legal copy (#1337)

* legal copy changes

* Added translations

* fix go back button

* use history.goBack for go back button

* show icons for soroswap tokens and final cleanup

* remove axios and auto add the token after successful token swap

* adding comments

* enable linting

* simplify asset dropdown logic

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: aristides <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* uses key val for public keys for inflation dest and trustor fields

* adding documentation to the Soroswap methods (#1350)

* removes sentry exceptions from expected failures to fetch contract specs

* check if either asset is a soroswap token (#1353)

* adds warning for current account xlm insufficient for fee

* adds loading state for getting balances before check

* uses correct logic to check for enough xlm to cover fee

* use correct denomination for fee in xlm comparison

* make warning dismissable

* adds malicious variant to connection request views

* adds blockaid duck

* moves blockaid scanSite to helper from duck workflow

* tweaks loader for grant access

* adds warning for grant access on blockaid scan miss

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Piyal Basu <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [BUG] SAC balance shows up twice in asset list (#1376)

* removes tokens with no balance, tweaks add asset tests timeout

* Added translations

* restore pre-push debug comment

* revert new snapshots

* adds default for recommended fee in hook

* Feature/doc preview build master (#1379)

* use single quotes

* add different cmds for netlify prod vs preview

* Bugfix/move netlify toml 2 (#1381)

* moving isNonSSLEnabled to Advanced Settings

* move the netlify.toml

* bump freighter-api version to trigger docs build

* fix toml

* try different netlify context

* update yarn.lock and defensive check for blockaid "miss"

* dont show dapp scan warning in grant access (#1390)

* Bugfix/sign msg auth entry buffer (#1392)

* copy fix

* Added translations

* return a buffer from sign message and sign auth entry

* rm eslint-disables

* fix tests

* Bugfix/re enable tests (#1395)

* copy fix

* Added translations

* re-enable flakey e2e tests

* rm eslint-disables

* adds tx scan calls during tx sign, no UI warnings (#1393)

* scan asset during Add Asset flow and Sign classic tx flow (#1405)

* upgrading ledger SDK (#1407)

* rm ssl toggle from Preferences (#1408)

* Bump fast-xml-parser in the npm_and_yarn group across 1 directory (#1391)

Bumps the npm_and_yarn group with 1 update in the / directory: [fast-xml-parser](https://github.com/NaturalIntelligence/fast-xml-parser).


Updates `fast-xml-parser` from 4.4.0 to 4.4.1
- [Release notes](https://github.com/NaturalIntelligence/fast-xml-parser/releases)
- [Changelog](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/NaturalIntelligence/fast-xml-parser/compare/v4.4.0...v4.4.1)

---
updated-dependencies:
- dependency-name: fast-xml-parser
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump the minor-and-patch group across 3 directories with 26 updates (#1399)

Bumps the minor-and-patch group with 24 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `7.24.7` | `7.25.2` |
| [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) | `7.24.7` | `7.25.1` |
| [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) | `7.24.7` | `7.25.3` |
| [@vercel/ncc](https://github.com/vercel/ncc) | `0.36.1` | `0.38.1` |
| [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) | `6.8.0` | `6.9.0` |
| [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | `7.34.2` | `7.35.0` |
| [webpack](https://github.com/webpack/webpack) | `5.91.0` | `5.93.0` |
| [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | `48.2.9` | `48.11.0` |
| [@stellar/js-xdr](https://github.com/stellar/js-xdr) | `3.1.1` | `3.1.2` |
| [stellar-sdk](https://github.com/stellar/js-stellar-sdk) | `12.1.0` | `12.2.0` |
| [webextension-polyfill](https://github.com/mozilla/webextension-polyfill) | `0.10.0` | `0.12.0` |
| [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) | `3.3.2` | `3.4.0` |
| [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic) | `3.3.2` | `3.4.0` |
| [@ledgerhq/hw-transport-webusb](https://github.com/LedgerHQ/ledger-live) | `6.28.6` | `6.29.2` |
| @stellar/typescript-wallet-sdk-km | `1.5.0` | `1.7.0` |
| [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome) | `0.0.104` | `0.0.269` |
| [@types/lodash](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/lodash) | `4.17.5` | `4.17.7` |
| [@types/webextension-polyfill](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webextension-polyfill) | `0.9.2` | `0.10.7` |
| [html-…
  • Loading branch information
3 people authored Aug 15, 2024
1 parent 89c391b commit 60ef968
Show file tree
Hide file tree
Showing 117 changed files with 3,213 additions and 2,171 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/runTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
timeout-minutes: 20
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.41.0-jammy
image: mcr.microsoft.com/playwright:v1.45.3-jammy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down
238 changes: 128 additions & 110 deletions @shared/api/external.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { EXTERNAL_SERVICE_TYPES } from "../constants/services";
import { NetworkDetails } from "../constants/stellar";
import { sendMessageToContentScript } from "./helpers/extensionMessaging";
import { UserInfo } from "./types";

export const requestAccess = async (): Promise<string> => {
let response = { publicKey: "", error: "" };
import {
sendMessageToContentScript,
FreighterApiInternalError,
} from "./helpers/extensionMessaging";
import { FreighterApiError } from "./types";

export const requestAccess = async (): Promise<{
publicKey: string;
error?: FreighterApiError;
}> => {
let response;
try {
response = await sendMessageToContentScript({
type: EXTERNAL_SERVICE_TYPES.REQUEST_ACCESS,
Expand All @@ -13,16 +19,16 @@ export const requestAccess = async (): Promise<string> => {
console.error(e);
}

const { publicKey, error } = response;
const { publicKey } = response || { publicKey: "" };

if (error) {
throw error;
}
return publicKey;
return { publicKey, error: response?.apiError };
};

export const requestPublicKey = async (): Promise<string> => {
let response = { publicKey: "", error: "" };
export const requestPublicKey = async (): Promise<{
publicKey: string;
error?: FreighterApiError;
}> => {
let response;
try {
response = await sendMessageToContentScript({
type: EXTERNAL_SERVICE_TYPES.REQUEST_PUBLIC_KEY,
Expand All @@ -31,25 +37,23 @@ export const requestPublicKey = async (): Promise<string> => {
console.error(e);
}

const { publicKey, error } = response;

if (error) {
throw error;
}
return publicKey;
return { publicKey: response?.publicKey || "", error: response?.apiError };
};

export const submitTransaction = async (
transactionXdr: string,
opts?:
| string
| {
network?: string;
accountToSign?: string;
networkPassphrase?: string;
},
accountToSign?: string,
): Promise<string> => {
): Promise<{
signedTransaction: string;
signerAddress: string;
error?: FreighterApiError;
}> => {
let network = "";
let _accountToSign = "";
let networkPassphrase = "";
Expand All @@ -60,15 +64,14 @@ export const submitTransaction = async (
This logic maintains backwards compatibility for older versions
*/
if (typeof opts === "object") {
network = opts.network || "";
_accountToSign = opts.accountToSign || "";
networkPassphrase = opts.networkPassphrase || "";
} else {
network = opts || "";
_accountToSign = accountToSign || "";
}

let response = { signedTransaction: "", error: "" };
let response;
try {
response = await sendMessageToContentScript({
transactionXdr,
Expand All @@ -78,127 +81,158 @@ export const submitTransaction = async (
type: EXTERNAL_SERVICE_TYPES.SUBMIT_TRANSACTION,
});
} catch (e) {
console.error(e);
throw e;
return {
signedTransaction: "",
signerAddress: "",
error: FreighterApiInternalError,
};
}
const { signedTransaction, error } = response;
const { signedTransaction, signerAddress } = response;

if (error) {
throw error;
}
return signedTransaction;
return { signedTransaction, signerAddress, error: response?.apiError };
};

export const submitBlob = async (
export const submitMessage = async (
blob: string,
opts?: {
accountToSign?: string;
address?: string;
networkPassphrase?: string;
},
): Promise<string> => {
let response = { signedBlob: "", error: "" };
): Promise<{
signedMessage: Buffer | null;
signerAddress: string;
error?: FreighterApiError;
}> => {
let response;
const _opts = opts || {};
const accountToSign = _opts.accountToSign || "";
const accountToSign = _opts.address || "";
try {
response = await sendMessageToContentScript({
blob,
accountToSign,
type: EXTERNAL_SERVICE_TYPES.SUBMIT_BLOB,
});
} catch (e) {
console.error(e);
throw e;
return {
signedMessage: null,
signerAddress: "",
error: FreighterApiInternalError,
};
}
const { signedBlob, error } = response;
const { signedBlob, signerAddress } = response;

if (error) {
throw error;
}
return signedBlob;
return {
signedMessage: signedBlob || null,
signerAddress,
error: response?.apiError,
};
};

export const submitAuthEntry = async (
entryXdr: string,
opts?: {
accountToSign?: string;
address?: string;
networkPassphrase?: string;
},
): Promise<string> => {
let response = { signedAuthEntry: "", error: "" };
): Promise<{
signedAuthEntry: Buffer | null;
signerAddress: string;
error?: FreighterApiError;
}> => {
const _opts = opts || {};
const accountToSign = _opts.accountToSign || "";
const accountToSign = _opts.address || "";
let response;
try {
response = await sendMessageToContentScript({
entryXdr,
accountToSign,
networkPassphrase: opts?.networkPassphrase,
type: EXTERNAL_SERVICE_TYPES.SUBMIT_AUTH_ENTRY,
});
} catch (e) {
console.error(e);
return {
signedAuthEntry: null,
signerAddress: "",
error: FreighterApiInternalError,
};
}
const { signedAuthEntry, error } = response;
const { signedAuthEntry, signerAddress } = response;

if (error) {
throw error;
}
return signedAuthEntry;
return {
signedAuthEntry: signedAuthEntry || null,
signerAddress,
error: response?.apiError,
};
};

export const requestNetwork = async (): Promise<string> => {
let response = { network: "", error: "" };
export const requestNetwork = async (): Promise<{
network: string;
networkPassphrase: string;
error?: FreighterApiError;
}> => {
let response;
try {
response = await sendMessageToContentScript({
type: EXTERNAL_SERVICE_TYPES.REQUEST_NETWORK,
type: EXTERNAL_SERVICE_TYPES.REQUEST_NETWORK_DETAILS,
});
} catch (e) {
console.error(e);
}

const { network, error } = response;
const { networkDetails } = response || {
networkDetails: { network: "", networkPassphrase: "" },
};

if (error) {
throw error;
}
return network;
return {
network: networkDetails?.network,
networkPassphrase: networkDetails?.networkPassphrase,
error: response?.apiError,
};
};

export const requestNetworkDetails = async (): Promise<{
network: string;
networkUrl: string;
networkPassphrase: string;
sorobanRpcUrl?: string;
error?: FreighterApiError;
}> => {
let response = {
let response;
try {
response = await sendMessageToContentScript({
type: EXTERNAL_SERVICE_TYPES.REQUEST_NETWORK_DETAILS,
});
} catch (e) {
console.error(e);
}

const { networkDetails, apiError } = response || {
networkDetails: {
network: "",
networkName: "",
networkUrl: "",
networkPassphrase: "",
sorobanRpcUrl: undefined,
apiError: "",
} as NetworkDetails,
error: "",
};
try {
response = await sendMessageToContentScript({
type: EXTERNAL_SERVICE_TYPES.REQUEST_NETWORK_DETAILS,
});
} catch (e) {
console.error(e);
}

const { networkDetails, error } = response;
const {
const { network, networkUrl, networkPassphrase, sorobanRpcUrl } =
networkDetails;

return {
network,
networkUrl,
networkPassphrase,
sorobanRpcUrl,
} = networkDetails;

if (error) {
throw error;
}
return { network, networkUrl, networkPassphrase, sorobanRpcUrl };
error: apiError,
};
};

export const requestConnectionStatus = async (): Promise<boolean> => {
export const requestConnectionStatus = async (): Promise<{
isConnected: boolean;
}> => {
let response = {
isConnected: false,
};
Expand All @@ -211,13 +245,14 @@ export const requestConnectionStatus = async (): Promise<boolean> => {
console.error(e);
}

return response.isConnected;
return { isConnected: response.isConnected };
};

export const requestAllowedStatus = async (): Promise<boolean> => {
let response = {
isAllowed: false,
};
export const requestAllowedStatus = async (): Promise<{
isAllowed: boolean;
error?: FreighterApiError;
}> => {
let response;

try {
response = await sendMessageToContentScript({
Expand All @@ -227,14 +262,16 @@ export const requestAllowedStatus = async (): Promise<boolean> => {
console.error(e);
}

return response.isAllowed;
const { isAllowed } = response || { isAllowed: false };

return { isAllowed, error: response?.apiError };
};

export const setAllowedStatus = async (): Promise<boolean> => {
let response = {
isAllowed: false,
error: "",
};
export const setAllowedStatus = async (): Promise<{
isAllowed: boolean;
error?: FreighterApiError;
}> => {
let response;

try {
response = await sendMessageToContentScript({
Expand All @@ -244,28 +281,9 @@ export const setAllowedStatus = async (): Promise<boolean> => {
console.error(e);
}

const { isAllowed, error } = response;

if (error) {
throw error;
}
return isAllowed;
};

export const requestUserInfo = async (): Promise<UserInfo> => {
let response = { userInfo: { publicKey: "" }, error: "" };
try {
response = await sendMessageToContentScript({
type: EXTERNAL_SERVICE_TYPES.REQUEST_USER_INFO,
});
} catch (e) {
console.error(e);
}

const { userInfo, error } = response;
const { isAllowed } = response || {
isAllowed: false,
};

if (error) {
throw error;
}
return userInfo;
return { isAllowed, error: response?.apiError };
};
Loading

0 comments on commit 60ef968

Please sign in to comment.