From 44e13b47d423a3c7056fb6000b2aaf3061a53813 Mon Sep 17 00:00:00 2001 From: Marco Ciaramella Date: Tue, 3 May 2022 18:17:22 +0200 Subject: [PATCH 01/25] added await in async function calls (#467) --- docs/docs/guide/usingFreighterBrowser.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/docs/guide/usingFreighterBrowser.md b/docs/docs/guide/usingFreighterBrowser.md index ad80ec6f62..1b1e733a8c 100644 --- a/docs/docs/guide/usingFreighterBrowser.md +++ b/docs/docs/guide/usingFreighterBrowser.md @@ -65,7 +65,7 @@ const retrievePublicKey = async () => { return publicKey; }; -const result = retrievePublicKey(); +const result = await retrievePublicKey(); ``` ### getNetwork @@ -96,7 +96,7 @@ const retrieveNetwork = async () => { return network; }; -const result = retrieveNetwork(); +const result = await retrieveNetwork(); ``` ### signTransaction @@ -135,7 +135,7 @@ const retrievePublicKey = async () => { return publicKey; }; -const retrievedPublicKey = retrievePublicKey(); +const retrievedPublicKey = await retrievePublicKey(); const userSignTransaction = async (xdr: string, network: string) => { let signedTransaction = ""; @@ -155,7 +155,7 @@ const userSignTransaction = async (xdr: string, network: string) => { }; const xdr = ""; // replace this with an xdr string of the transaction you want to sign -const userSignedTransaction = userSignTransaction(xdr, "TESTNET"); +const userSignedTransaction = await userSignTransaction(xdr, "TESTNET"); ``` freighter-api will return a signed transaction xdr. Below is an example of how you might submit this signed transaction to Horizon using `stellar-sdk` (https://github.com/stellar/js-stellar-sdk): @@ -180,7 +180,7 @@ const userSignTransaction = async (xdr: string, network: string) => { const xdr = ""; // replace this with an xdr string of the transaction you want to sign -const userSignedTransaction = userSignTransaction(xdr, "TESTNET"); +const userSignedTransaction = await userSignTransaction(xdr, "TESTNET"); const SERVER_URL = "https://horizon-testnet.stellar.org"; From 6e89092cd0d1b4e18eafebb2c787d9c7a9ac7263 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Thu, 12 May 2022 14:34:24 -0400 Subject: [PATCH 02/25] adding first attempt at beta pipeline (#483) --- .github/workflows/submitBeta.yml | 127 ++++++++++++++++++ ...bmitExtension.yml => submitProduction.yml} | 0 2 files changed, 127 insertions(+) create mode 100644 .github/workflows/submitBeta.yml rename .github/workflows/{submitExtension.yml => submitProduction.yml} (100%) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml new file mode 100644 index 0000000000..b72922c45d --- /dev/null +++ b/.github/workflows/submitBeta.yml @@ -0,0 +1,127 @@ +name: Submit extension to browser store +on: + workflow_dispatch: + inputs: + release: + description: Release Number + default: "2.0.0" + required: true + version: + description: Beta version + default: "0" + required: true +jobs: + bump-version: + name: Bump Package Version and Submit Extension + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: release/${{ github.event.inputs.release }} + - name: Update manifest.json name + uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + with: + file: ./extension/public/static/manifest.json + field: name + value: Freighter BETA + - name: Update manifest.json version_name + uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + with: + file: ./extension/public/static/manifest.json + field: version_name + value: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }} + - name: Update manifest.json version + uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + with: + file: ./extension/public/static/manifest.json + field: version + value: ${{ github.event.inputs.release }} + - name: Build extension + uses: actions/setup-node@v1 + with: + node-version: "12" + - run: yarn install && yarn build:freighter-api && yarn build:extension:production --define 'process.env.AMPLITUDE_KEY="${{ secrets.AMPLITUDE_KEY }}"' --define 'process.env.SENTRY_KEY="${{ secrets.SENTRY_KEY }}"' + - name: Install zip + uses: montudor/action-zip@c25e01d7489d0274569440a2f0281b4569df16bc #v0.1.1 + - name: Zip extension build + run: zip -qq -r ./build.zip * + working-directory: ./extension/build + - name: Commit files + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add -A + git commit -m "docs(): bumping release to ${{ github.event.inputs.version }}" + git tag ${{ github.event.inputs.version }} + - name: Create Pull Request + uses: peter-evans/create-pull-request@7380612b49221684fefa025244f2ef4008ae50ad #v3.10.1 + with: + title: Bump versions to ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }} + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }} + release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }} + body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }} + draft: false + prerelease: true + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./extension/build/build.zip + asset_name: build-${{ github.event.inputs.version }}.zip + asset_content_type: application/zip + - name: Build extension for Firefox + id: firefox-build + uses: kewisch/action-web-ext@a28b4ba2f491cc36c67a714a716ca54218440056 #v1 + with: + cmd: build + source: ./extension/build + filename: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }}.xpi + - name: Sign extension for Firefox + id: firefox-sign + uses: kewisch/action-web-ext@a28b4ba2f491cc36c67a714a716ca54218440056 #v1 + with: + cmd: sign + source: ${{ steps.firefox-build.outputs.target }} + channel: unlisted + apiKey: ${{ secrets.AMO_SIGN_KEY }} + apiSecret: ${{ secrets.AMO_SIGN_SECRET }} + timeout: 900000 + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.firefox-sign.outputs.target }} + asset_name: build-${{ github.event.inputs.version }}.xpi + asset_content_type: application/xpi + - name: Submit extension to Chrome + uses: mnao305/chrome-extension-upload@cf3c0991d2106541415f20bec91619ff72d03293 #v1.1.1 + with: + file-path: ./extension/build/build.zip + extension-id: "kcigoalhjaghfigblagmiopnefgenfjb" + client-id: ${{ secrets.EXTENSION_CLIENT_ID }} + client-secret: ${{ secrets.EXTENSION_CLIENT_SECRET }} + refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN }} + - name: Slack Notification + uses: rtCamp/action-slack-notify@4d4ce0d91186ffe6633a8cda645146d38e88228b #v2 + env: + MSG_MINIMAL: true + SLACK_CHANNEL: proj-freighter + SLACK_COLOR: "#391EDA" + SLACK_ICON: https://github.com/stellar/freighter/blob/master/docs/static/images/logo.png?size=48 + SLACK_MESSAGE: "https://github.com/stellar/freighter/releases/tag/${{ github.event.inputs.version }}" + SLACK_TITLE: Freighter v${{ github.event.inputs.version }} has been submitted to app stores for review! + SLACK_USERNAME: Freighter Administrative Assistant + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/submitExtension.yml b/.github/workflows/submitProduction.yml similarity index 100% rename from .github/workflows/submitExtension.yml rename to .github/workflows/submitProduction.yml From 925500e10cb719b129b5e870c3427f6a1f8c4732 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Thu, 12 May 2022 14:50:16 -0400 Subject: [PATCH 03/25] change workflow names --- .github/workflows/submitBeta.yml | 2 +- .github/workflows/submitProduction.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index b72922c45d..53249f1f24 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -1,4 +1,4 @@ -name: Submit extension to browser store +name: Beta Deployment on: workflow_dispatch: inputs: diff --git a/.github/workflows/submitProduction.yml b/.github/workflows/submitProduction.yml index 30436a4a52..b5aaefd7b3 100644 --- a/.github/workflows/submitProduction.yml +++ b/.github/workflows/submitProduction.yml @@ -1,4 +1,4 @@ -name: Submit extension to browser store +name: Production Deployment on: workflow_dispatch: inputs: From b608a26df1a76b6814774ea6424850cd8f074944 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Thu, 12 May 2022 15:05:56 -0400 Subject: [PATCH 04/25] rm duped id --- .github/workflows/submitBeta.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index 53249f1f24..0efceaa6aa 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -96,8 +96,7 @@ jobs: apiKey: ${{ secrets.AMO_SIGN_KEY }} apiSecret: ${{ secrets.AMO_SIGN_SECRET }} timeout: 900000 - - name: Upload Release Asset - id: upload-release-asset + - name: Upload Firefox xpi uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} From a8d81efc6d2039e923c49393e7a407d36dc0b3b0 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Thu, 12 May 2022 15:27:12 -0400 Subject: [PATCH 05/25] rm analytics and change naming --- .github/workflows/submitBeta.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index 0efceaa6aa..9b9cebe372 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -41,7 +41,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: "12" - - run: yarn install && yarn build:freighter-api && yarn build:extension:production --define 'process.env.AMPLITUDE_KEY="${{ secrets.AMPLITUDE_KEY }}"' --define 'process.env.SENTRY_KEY="${{ secrets.SENTRY_KEY }}"' + - run: yarn install && yarn build:freighter-api && yarn build:extension:production - name: Install zip uses: montudor/action-zip@c25e01d7489d0274569440a2f0281b4569df16bc #v0.1.1 - name: Zip extension build @@ -77,7 +77,7 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./extension/build/build.zip - asset_name: build-${{ github.event.inputs.version }}.zip + asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }}.zip asset_content_type: application/zip - name: Build extension for Firefox id: firefox-build @@ -95,7 +95,6 @@ jobs: channel: unlisted apiKey: ${{ secrets.AMO_SIGN_KEY }} apiSecret: ${{ secrets.AMO_SIGN_SECRET }} - timeout: 900000 - name: Upload Firefox xpi uses: actions/upload-release-asset@v1 env: From fde73d1041d531bd857aa956599b8b2d726b71d7 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Thu, 12 May 2022 17:41:51 -0400 Subject: [PATCH 06/25] don't bother creating a PR --- .github/workflows/submitBeta.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index 9b9cebe372..ac1f7f1346 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -54,10 +54,6 @@ jobs: git add -A git commit -m "docs(): bumping release to ${{ github.event.inputs.version }}" git tag ${{ github.event.inputs.version }} - - name: Create Pull Request - uses: peter-evans/create-pull-request@7380612b49221684fefa025244f2ef4008ae50ad #v3.10.1 - with: - title: Bump versions to ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }} - name: Create GitHub Release id: create_release uses: actions/create-release@v1 From 0bcc11b85a90e3efda260d7ca434c83b4cc5e8ad Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Fri, 13 May 2022 14:47:52 -0400 Subject: [PATCH 07/25] update naming and use a different version for FF --- .github/workflows/submitBeta.yml | 39 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index ac1f7f1346..42fc8b45f6 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -30,14 +30,14 @@ jobs: with: file: ./extension/public/static/manifest.json field: version_name - value: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }} - - name: Update manifest.json version + value: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + - name: Update manifest.json version for Chrome uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 with: file: ./extension/public/static/manifest.json field: version value: ${{ github.event.inputs.release }} - - name: Build extension + - name: Build extension for Chrome uses: actions/setup-node@v1 with: node-version: "12" @@ -47,22 +47,15 @@ jobs: - name: Zip extension build run: zip -qq -r ./build.zip * working-directory: ./extension/build - - name: Commit files - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add -A - git commit -m "docs(): bumping release to ${{ github.event.inputs.version }}" - git tag ${{ github.event.inputs.version }} - name: Create GitHub Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ github.token }} with: - tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }} - release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }} - body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }} + tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} draft: false prerelease: true - name: Upload Release Asset @@ -73,24 +66,36 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./extension/build/build.zip - asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }}.zip + asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip asset_content_type: application/zip + - name: Update manifest.json version for Firefox + uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + with: + file: ./extension/public/static/manifest.json + field: version + value: ${{ github.event.inputs.release }}beta${{ github.event.inputs.version }} - name: Build extension for Firefox + uses: actions/setup-node@v1 + with: + node-version: "12" + - run: yarn build:extension:production + - name: Build xpi for Firefox id: firefox-build - uses: kewisch/action-web-ext@a28b4ba2f491cc36c67a714a716ca54218440056 #v1 + uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 with: cmd: build source: ./extension/build - filename: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.release }}.xpi + filename: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.xpi - name: Sign extension for Firefox id: firefox-sign - uses: kewisch/action-web-ext@a28b4ba2f491cc36c67a714a716ca54218440056 #v1 + uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 with: cmd: sign source: ${{ steps.firefox-build.outputs.target }} channel: unlisted apiKey: ${{ secrets.AMO_SIGN_KEY }} apiSecret: ${{ secrets.AMO_SIGN_SECRET }} + timeout: 1800000 - name: Upload Firefox xpi uses: actions/upload-release-asset@v1 env: From 667c523ea49d67a6453fef637147f7eb43b09f9f Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Fri, 13 May 2022 15:14:52 -0400 Subject: [PATCH 08/25] publish chrome to testers and rename FF artifact --- .github/workflows/submitBeta.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index 42fc8b45f6..682a8ccfd8 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -103,7 +103,7 @@ jobs: with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ${{ steps.firefox-sign.outputs.target }} - asset_name: build-${{ github.event.inputs.version }}.xpi + asset_name: ${{ github.event.inputs.release }}-${{ github.event.inputs.version }}.xpi asset_content_type: application/xpi - name: Submit extension to Chrome uses: mnao305/chrome-extension-upload@cf3c0991d2106541415f20bec91619ff72d03293 #v1.1.1 @@ -113,6 +113,7 @@ jobs: client-id: ${{ secrets.EXTENSION_CLIENT_ID }} client-secret: ${{ secrets.EXTENSION_CLIENT_SECRET }} refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN }} + publish-target: trustedTesters - name: Slack Notification uses: rtCamp/action-slack-notify@4d4ce0d91186ffe6633a8cda645146d38e88228b #v2 env: From 29dd096363feb0381ec3c7a599d61bd6a951dba2 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Fri, 13 May 2022 15:29:45 -0400 Subject: [PATCH 09/25] upgrade chrome upload to allow publish target --- .github/workflows/submitBeta.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index 682a8ccfd8..ba5074df13 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -106,7 +106,7 @@ jobs: asset_name: ${{ github.event.inputs.release }}-${{ github.event.inputs.version }}.xpi asset_content_type: application/xpi - name: Submit extension to Chrome - uses: mnao305/chrome-extension-upload@cf3c0991d2106541415f20bec91619ff72d03293 #v1.1.1 + uses: mnao305/chrome-extension-upload@4061bc03cde1feaec8b153654495c88857fb76c3 #v2.2.0 with: file-path: ./extension/build/build.zip extension-id: "kcigoalhjaghfigblagmiopnefgenfjb" From 78a78ec32a9dc8be86459c71cf282ab9514d7741 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Fri, 13 May 2022 15:40:24 -0400 Subject: [PATCH 10/25] just run chrome upload --- .github/workflows/submitBeta.yml | 117 +++++++++++++++---------------- 1 file changed, 58 insertions(+), 59 deletions(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index ba5074df13..0166d18a1a 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -47,71 +47,70 @@ jobs: - name: Zip extension build run: zip -qq -r ./build.zip * working-directory: ./extension/build - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} - release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} - body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} - draft: false - prerelease: true - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./extension/build/build.zip - asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip - asset_content_type: application/zip - - name: Update manifest.json version for Firefox - uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 - with: - file: ./extension/public/static/manifest.json - field: version - value: ${{ github.event.inputs.release }}beta${{ github.event.inputs.version }} - - name: Build extension for Firefox - uses: actions/setup-node@v1 - with: - node-version: "12" - - run: yarn build:extension:production - - name: Build xpi for Firefox - id: firefox-build - uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 - with: - cmd: build - source: ./extension/build - filename: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.xpi - - name: Sign extension for Firefox - id: firefox-sign - uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 - with: - cmd: sign - source: ${{ steps.firefox-build.outputs.target }} - channel: unlisted - apiKey: ${{ secrets.AMO_SIGN_KEY }} - apiSecret: ${{ secrets.AMO_SIGN_SECRET }} - timeout: 1800000 - - name: Upload Firefox xpi - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ steps.firefox-sign.outputs.target }} - asset_name: ${{ github.event.inputs.release }}-${{ github.event.inputs.version }}.xpi - asset_content_type: application/xpi + # - name: Create GitHub Release + # id: create_release + # uses: actions/create-release@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + # release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + # body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + # draft: false + # prerelease: true + # - name: Upload Release Asset + # id: upload-release-asset + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ./extension/build/build.zip + # asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip + # asset_content_type: application/zip + # - name: Update manifest.json version for Firefox + # uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + # with: + # file: ./extension/public/static/manifest.json + # field: version + # value: ${{ github.event.inputs.release }}beta${{ github.event.inputs.version }} + # - name: Build extension for Firefox + # uses: actions/setup-node@v1 + # with: + # node-version: "12" + # - run: yarn build:extension:production + # - name: Build xpi for Firefox + # id: firefox-build + # uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 + # with: + # cmd: build + # source: ./extension/build + # filename: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.xpi + # - name: Sign extension for Firefox + # id: firefox-sign + # uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 + # with: + # cmd: sign + # source: ${{ steps.firefox-build.outputs.target }} + # channel: unlisted + # apiKey: ${{ secrets.AMO_SIGN_KEY }} + # apiSecret: ${{ secrets.AMO_SIGN_SECRET }} + # timeout: 1800000 + # - name: Upload Firefox xpi + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ${{ steps.firefox-sign.outputs.target }} + # asset_name: ${{ github.event.inputs.release }}-${{ github.event.inputs.version }}.xpi + # asset_content_type: application/xpi - name: Submit extension to Chrome uses: mnao305/chrome-extension-upload@4061bc03cde1feaec8b153654495c88857fb76c3 #v2.2.0 with: file-path: ./extension/build/build.zip extension-id: "kcigoalhjaghfigblagmiopnefgenfjb" client-id: ${{ secrets.EXTENSION_CLIENT_ID }} - client-secret: ${{ secrets.EXTENSION_CLIENT_SECRET }} refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN }} publish-target: trustedTesters - name: Slack Notification From 68fc0eefcbec609b8f9c004deedb75015057c440 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Tue, 17 May 2022 12:19:23 -0400 Subject: [PATCH 11/25] try new secret keys --- .github/workflows/submitBeta.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index 0166d18a1a..1d86c9730a 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -110,8 +110,8 @@ jobs: with: file-path: ./extension/build/build.zip extension-id: "kcigoalhjaghfigblagmiopnefgenfjb" - client-id: ${{ secrets.EXTENSION_CLIENT_ID }} - refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN }} + client-id: ${{ secrets.EXTENSION_CLIENT_ID_V2 }} + refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN_V2 }} publish-target: trustedTesters - name: Slack Notification uses: rtCamp/action-slack-notify@4d4ce0d91186ffe6633a8cda645146d38e88228b #v2 @@ -120,7 +120,7 @@ jobs: SLACK_CHANNEL: proj-freighter SLACK_COLOR: "#391EDA" SLACK_ICON: https://github.com/stellar/freighter/blob/master/docs/static/images/logo.png?size=48 - SLACK_MESSAGE: "https://github.com/stellar/freighter/releases/tag/${{ github.event.inputs.version }}" - SLACK_TITLE: Freighter v${{ github.event.inputs.version }} has been submitted to app stores for review! + SLACK_MESSAGE: "https://github.com/stellar/freighter/releases/tag/{{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}" + SLACK_TITLE: Freighter v${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} has been submitted for testing! SLACK_USERNAME: Freighter Administrative Assistant SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} From a24441ba71c8142368f9f7e203ec5c5dbe5e5515 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Wed, 18 May 2022 13:16:35 -0400 Subject: [PATCH 12/25] try the whole thing --- .github/workflows/submitBeta.yml | 116 +++++++++++++++---------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index 1d86c9730a..281136c79f 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -47,64 +47,64 @@ jobs: - name: Zip extension build run: zip -qq -r ./build.zip * working-directory: ./extension/build - # - name: Create GitHub Release - # id: create_release - # uses: actions/create-release@v1 - # env: - # GITHUB_TOKEN: ${{ github.token }} - # with: - # tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} - # release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} - # body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} - # draft: false - # prerelease: true - # - name: Upload Release Asset - # id: upload-release-asset - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ github.token }} - # with: - # upload_url: ${{ steps.create_release.outputs.upload_url }} - # asset_path: ./extension/build/build.zip - # asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip - # asset_content_type: application/zip - # - name: Update manifest.json version for Firefox - # uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 - # with: - # file: ./extension/public/static/manifest.json - # field: version - # value: ${{ github.event.inputs.release }}beta${{ github.event.inputs.version }} - # - name: Build extension for Firefox - # uses: actions/setup-node@v1 - # with: - # node-version: "12" - # - run: yarn build:extension:production - # - name: Build xpi for Firefox - # id: firefox-build - # uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 - # with: - # cmd: build - # source: ./extension/build - # filename: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.xpi - # - name: Sign extension for Firefox - # id: firefox-sign - # uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 - # with: - # cmd: sign - # source: ${{ steps.firefox-build.outputs.target }} - # channel: unlisted - # apiKey: ${{ secrets.AMO_SIGN_KEY }} - # apiSecret: ${{ secrets.AMO_SIGN_SECRET }} - # timeout: 1800000 - # - name: Upload Firefox xpi - # uses: actions/upload-release-asset@v1 - # env: - # GITHUB_TOKEN: ${{ github.token }} - # with: - # upload_url: ${{ steps.create_release.outputs.upload_url }} - # asset_path: ${{ steps.firefox-sign.outputs.target }} - # asset_name: ${{ github.event.inputs.release }}-${{ github.event.inputs.version }}.xpi - # asset_content_type: application/xpi + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + draft: false + prerelease: true + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./extension/build/build.zip + asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip + asset_content_type: application/zip + - name: Update manifest.json version for Firefox + uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + with: + file: ./extension/public/static/manifest.json + field: version + value: ${{ github.event.inputs.release }}beta${{ github.event.inputs.version }} + - name: Build extension for Firefox + uses: actions/setup-node@v1 + with: + node-version: "12" + - run: yarn build:extension:production + - name: Build xpi for Firefox + id: firefox-build + uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 + with: + cmd: build + source: ./extension/build + filename: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.xpi + - name: Sign extension for Firefox + id: firefox-sign + uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 + with: + cmd: sign + source: ${{ steps.firefox-build.outputs.target }} + channel: unlisted + apiKey: ${{ secrets.AMO_SIGN_KEY }} + apiSecret: ${{ secrets.AMO_SIGN_SECRET }} + timeout: 1800000 + - name: Upload Firefox xpi + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.firefox-sign.outputs.target }} + asset_name: ${{ github.event.inputs.release }}-${{ github.event.inputs.version }}.xpi + asset_content_type: application/xpi - name: Submit extension to Chrome uses: mnao305/chrome-extension-upload@4061bc03cde1feaec8b153654495c88857fb76c3 #v2.2.0 with: From ffe296c2743c4b72e82c32ce25ce6e818563eb2a Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Wed, 18 May 2022 13:38:22 -0400 Subject: [PATCH 13/25] change file path for chrome upload --- .github/workflows/submitBeta.yml | 118 +++++++++++++++---------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index 281136c79f..5274dd976b 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -47,68 +47,68 @@ jobs: - name: Zip extension build run: zip -qq -r ./build.zip * working-directory: ./extension/build - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} - release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} - body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} - draft: false - prerelease: true - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./extension/build/build.zip - asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip - asset_content_type: application/zip - - name: Update manifest.json version for Firefox - uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 - with: - file: ./extension/public/static/manifest.json - field: version - value: ${{ github.event.inputs.release }}beta${{ github.event.inputs.version }} - - name: Build extension for Firefox - uses: actions/setup-node@v1 - with: - node-version: "12" - - run: yarn build:extension:production - - name: Build xpi for Firefox - id: firefox-build - uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 - with: - cmd: build - source: ./extension/build - filename: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.xpi - - name: Sign extension for Firefox - id: firefox-sign - uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 - with: - cmd: sign - source: ${{ steps.firefox-build.outputs.target }} - channel: unlisted - apiKey: ${{ secrets.AMO_SIGN_KEY }} - apiSecret: ${{ secrets.AMO_SIGN_SECRET }} - timeout: 1800000 - - name: Upload Firefox xpi - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ steps.firefox-sign.outputs.target }} - asset_name: ${{ github.event.inputs.release }}-${{ github.event.inputs.version }}.xpi - asset_content_type: application/xpi + # - name: Create GitHub Release + # id: create_release + # uses: actions/create-release@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + # release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + # body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + # draft: false + # prerelease: true + # - name: Upload Release Asset + # id: upload-release-asset + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ./extension/build/build.zip + # asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip + # asset_content_type: application/zip + # - name: Update manifest.json version for Firefox + # uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + # with: + # file: ./extension/public/static/manifest.json + # field: version + # value: ${{ github.event.inputs.release }}beta${{ github.event.inputs.version }} + # - name: Build extension for Firefox + # uses: actions/setup-node@v1 + # with: + # node-version: "12" + # - run: yarn build:extension:production + # - name: Build xpi for Firefox + # id: firefox-build + # uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 + # with: + # cmd: build + # source: ./extension/build + # filename: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.xpi + # - name: Sign extension for Firefox + # id: firefox-sign + # uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 + # with: + # cmd: sign + # source: ${{ steps.firefox-build.outputs.target }} + # channel: unlisted + # apiKey: ${{ secrets.AMO_SIGN_KEY }} + # apiSecret: ${{ secrets.AMO_SIGN_SECRET }} + # timeout: 1800000 + # - name: Upload Firefox xpi + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ${{ steps.firefox-sign.outputs.target }} + # asset_name: ${{ github.event.inputs.release }}-${{ github.event.inputs.version }}.xpi + # asset_content_type: application/xpi - name: Submit extension to Chrome uses: mnao305/chrome-extension-upload@4061bc03cde1feaec8b153654495c88857fb76c3 #v2.2.0 with: - file-path: ./extension/build/build.zip + file-path: ./extension/build/build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip extension-id: "kcigoalhjaghfigblagmiopnefgenfjb" client-id: ${{ secrets.EXTENSION_CLIENT_ID_V2 }} refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN_V2 }} From d1c32814685842b349bf9b1f6f6c02c1f759d1ae Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Thu, 19 May 2022 13:31:58 -0400 Subject: [PATCH 14/25] change version naming and set publish to true --- .github/workflows/submitBeta.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index 5274dd976b..88914d5ee9 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -36,8 +36,8 @@ jobs: with: file: ./extension/public/static/manifest.json field: version - value: ${{ github.event.inputs.release }} - - name: Build extension for Chrome + value: ${{ github.event.inputs.release }}.${{ github.event.inputs.version }} + - name: Build extension uses: actions/setup-node@v1 with: node-version: "12" @@ -68,17 +68,6 @@ jobs: # asset_path: ./extension/build/build.zip # asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip # asset_content_type: application/zip - # - name: Update manifest.json version for Firefox - # uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 - # with: - # file: ./extension/public/static/manifest.json - # field: version - # value: ${{ github.event.inputs.release }}beta${{ github.event.inputs.version }} - # - name: Build extension for Firefox - # uses: actions/setup-node@v1 - # with: - # node-version: "12" - # - run: yarn build:extension:production # - name: Build xpi for Firefox # id: firefox-build # uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 @@ -108,10 +97,11 @@ jobs: - name: Submit extension to Chrome uses: mnao305/chrome-extension-upload@4061bc03cde1feaec8b153654495c88857fb76c3 #v2.2.0 with: - file-path: ./extension/build/build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip + file-path: ./extension/build/build.zip extension-id: "kcigoalhjaghfigblagmiopnefgenfjb" client-id: ${{ secrets.EXTENSION_CLIENT_ID_V2 }} refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN_V2 }} + publish: true publish-target: trustedTesters - name: Slack Notification uses: rtCamp/action-slack-notify@4d4ce0d91186ffe6633a8cda645146d38e88228b #v2 From 265a8a75916838338d812dad83b193e0bf622ee9 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Mon, 23 May 2022 14:08:22 -0400 Subject: [PATCH 15/25] add `beta` to version for Firefox --- .github/workflows/submitBeta.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml index 88914d5ee9..54627a61f9 100644 --- a/.github/workflows/submitBeta.yml +++ b/.github/workflows/submitBeta.yml @@ -68,6 +68,12 @@ jobs: # asset_path: ./extension/build/build.zip # asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip # asset_content_type: application/zip + # - name: Update built manifest.json version for Firefox + # uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + # with: + # file: ./extension/build/manifest.json + # field: version + # value: ${{ github.event.inputs.release }}beta${{ github.event.inputs.version }} # - name: Build xpi for Firefox # id: firefox-build # uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 From 68c064632f38adf8a7ca6bd3f6cc700abc268710 Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Fri, 29 Apr 2022 16:45:12 -0400 Subject: [PATCH 16/25] update stellar-sdk for Protocol 19 (#466) --- @shared/api/package.json | 2 +- @shared/constants/package.json | 2 +- @shared/helpers/package.json | 2 +- extension/package.json | 2 +- .../popup/views/SignTransaction/styles.scss | 2 +- yarn.lock | 34 +++++++++++++------ 6 files changed, 28 insertions(+), 16 deletions(-) diff --git a/@shared/api/package.json b/@shared/api/package.json index 2b8565d701..8da79c00f2 100644 --- a/@shared/api/package.json +++ b/@shared/api/package.json @@ -6,7 +6,7 @@ "dependencies": { "@stellar/wallet-sdk": "^0.6.0-rc.1", "prettier": "^2.0.5", - "stellar-sdk": "^10.0.1", + "stellar-sdk": "^10.1.0", "typescript": "~3.7.2", "webextension-polyfill-ts": "^0.22.0" }, diff --git a/@shared/constants/package.json b/@shared/constants/package.json index f0728f2d98..7a161c9d00 100644 --- a/@shared/constants/package.json +++ b/@shared/constants/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "dependencies": { "typescript": "~3.7.2", - "stellar-sdk": "^10.0.1" + "stellar-sdk": "^10.1.0" }, "devDependencies": { "@stellar/prettier-config": "^1.0.1" diff --git a/@shared/helpers/package.json b/@shared/helpers/package.json index 8304a93d27..86e76735a3 100644 --- a/@shared/helpers/package.json +++ b/@shared/helpers/package.json @@ -4,7 +4,7 @@ "version": "1.0.0", "dependencies": { "typescript": "~3.7.2", - "stellar-sdk": "^10.0.1" + "stellar-sdk": "^10.1.0" }, "devDependencies": { "@stellar/prettier-config": "^1.0.1" diff --git a/extension/package.json b/extension/package.json index 98b0f221d1..6b79517e0e 100755 --- a/extension/package.json +++ b/extension/package.json @@ -62,7 +62,7 @@ "simplebar-react": "^2.3.6", "stellar-hd-wallet": "^0.0.10", "stellar-identicon-js": "^1.0.0", - "stellar-sdk": "^10.0.1", + "stellar-sdk": "^10.1.0", "svg-url-loader": "^5.0.0", "tsconfig-paths-webpack-plugin": "^3.2.0", "tslib": "2.0.0", diff --git a/extension/src/popup/views/SignTransaction/styles.scss b/extension/src/popup/views/SignTransaction/styles.scss index 5799279557..b2bf41b329 100644 --- a/extension/src/popup/views/SignTransaction/styles.scss +++ b/extension/src/popup/views/SignTransaction/styles.scss @@ -4,7 +4,7 @@ border-radius: 0.5rem; height: 10rem; opacity: 0.7; - overflow: scroll; + overflow: auto; padding: 1rem 2rem; zoom: 0.7; } diff --git a/yarn.lock b/yarn.lock index 03eb1cfdcb..f236e37d40 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10908,6 +10908,11 @@ node-gyp-build@^4.1.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== +node-gyp-build@^4.3.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.4.0.tgz#42e99687ce87ddeaf3a10b99dc06abc11021f3f4" + integrity sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ== + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -14156,6 +14161,13 @@ sodium-native@^2.3.0: nan "^2.14.0" node-gyp-build "^4.1.0" +sodium-native@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/sodium-native/-/sodium-native-3.3.0.tgz#50ee52ac843315866cce3d0c08ab03eb78f22361" + integrity sha512-rg6lCDM/qa3p07YGqaVD+ciAbUqm6SoO4xmlcfkbU5r1zIGrguXztLiEtaLYTV5U6k8KSIUFmnU3yQUSKmf6DA== + dependencies: + node-gyp-build "^4.3.0" + sort-css-media-queries@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/sort-css-media-queries/-/sort-css-media-queries-1.5.0.tgz#8f605ad372caad0b81be010311882c046e738093" @@ -14379,10 +14391,10 @@ stellar-base@^0.13.1: optionalDependencies: sodium-native "^2.3.0" -stellar-base@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/stellar-base/-/stellar-base-7.0.0.tgz#6ebb359fc0a5e8fe6ed855c62de78cbec779b463" - integrity sha512-Sfk/u/6HT+8xSQ4HvTI3XgthTS3fhv/ie6Jx4OzLvg81pt09bDDN5YvRbG6v3gZdiRA0pwg2RRz5YS3ph5ePEg== +stellar-base@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/stellar-base/-/stellar-base-8.0.0.tgz#619e5fb7951fa8abb26322e51e611169a5d1cf62" + integrity sha512-MH0V94Hn/Ekq/yZxd+EQijkvfU+21zuqJAyEP8X+fhRR0IQYwGNByY003oLqIkgwqXotyofEQ76W5MoNFZmlpw== dependencies: base32.js "^0.1.0" bignumber.js "^4.0.0" @@ -14390,9 +14402,9 @@ stellar-base@^7.0.0: js-xdr "^1.1.3" lodash "^4.17.21" sha.js "^2.3.6" - tweetnacl "^1.0.0" + tweetnacl "^1.0.3" optionalDependencies: - sodium-native "^2.3.0" + sodium-native "^3.3.0" stellar-hd-wallet@^0.0.10: version "0.0.10" @@ -14411,10 +14423,10 @@ stellar-identicon-js@^1.0.0: dependencies: html-webpack-plugin "^3.2.0" -stellar-sdk@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/stellar-sdk/-/stellar-sdk-10.0.1.tgz#0a5ec3cd913c2a32897c1ef13abf41017b91634f" - integrity sha512-NWvDAldw4GVFqWo1wGoR9lCyJ6xIcO2ab4YX8BQYp1Z45/Rogv3Kj3RERsso/9m+MR+d2OfTmAhIy0vruRGv/Q== +stellar-sdk@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/stellar-sdk/-/stellar-sdk-10.1.0.tgz#91cf9ed3c84c9a9d4c8aaa6cca29bd997b7c778a" + integrity sha512-8PTKuyrQ5bIbsyrLav+JE/c+rrLynBygiB4dpvG30ou7K8P6a5ainmGyVMbCzlz1OkKWoaAW5rJAkl3RhlTZkA== dependencies: "@types/eventsource" "^1.1.2" "@types/node" ">= 8" @@ -14427,7 +14439,7 @@ stellar-sdk@^10.0.1: eventsource "^1.0.7" lodash "^4.17.21" randombytes "^2.1.0" - stellar-base "^7.0.0" + stellar-base "^8.0.0" toml "^2.3.0" tslib "^1.10.0" urijs "^1.19.1" From 4de0b4cc6325f03b2a817784fb427471aa78585e Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Wed, 11 May 2022 18:00:31 -0400 Subject: [PATCH 17/25] add additional tracking for payments and manage assets (#482) * add additional tracking for payments * undo formatting * add manage asset tracking * emitMetric only when submission succeeds --- .../manageAssets/ManageAssetRows/index.tsx | 8 ++++++++ .../components/manageAssets/TrustlineError/index.tsx | 7 +++++++ .../sendPayment/SendAmount/SendType/index.tsx | 7 +++++++ .../components/sendPayment/SendAmount/index.tsx | 3 +++ .../sendPayment/SendConfirm/SubmitResult/index.tsx | 8 +++++++- .../SendConfirm/TransactionDetails/index.tsx | 12 ++++++++++++ .../popup/components/sendPayment/SendTo/index.tsx | 3 +++ extension/src/popup/constants/metricsNames.ts | 12 ++++++++++++ 8 files changed, 59 insertions(+), 1 deletion(-) diff --git a/extension/src/popup/components/manageAssets/ManageAssetRows/index.tsx b/extension/src/popup/components/manageAssets/ManageAssetRows/index.tsx index eb5f34ca3a..c26ca9c2b5 100644 --- a/extension/src/popup/components/manageAssets/ManageAssetRows/index.tsx +++ b/extension/src/popup/components/manageAssets/ManageAssetRows/index.tsx @@ -6,11 +6,13 @@ import "simplebar-react/dist/simplebar.min.css"; import { AppDispatch } from "popup/App"; +import { emitMetric } from "helpers/metrics"; import { navigateTo } from "popup/helpers/navigate"; import { getCanonicalFromAsset } from "helpers/stellar"; import { PillButton } from "popup/basics/buttons/PillButton"; +import { METRIC_NAMES } from "popup/constants/metricsNames"; import { ROUTES } from "popup/constants/routes"; import { publicKeySelector } from "popup/ducks/accountServices"; @@ -108,6 +110,12 @@ export const ManageAssetRows = ({ }), ); dispatch(resetSubmission()); + emitMetric( + addTrustline + ? METRIC_NAMES.manageAssetAddAsset + : METRIC_NAMES.manageAssetRemoveAsset, + { assetCode, assetIssuer }, + ); navigateTo(ROUTES.account); } diff --git a/extension/src/popup/components/manageAssets/TrustlineError/index.tsx b/extension/src/popup/components/manageAssets/TrustlineError/index.tsx index 20e2263818..fcd635b84a 100644 --- a/extension/src/popup/components/manageAssets/TrustlineError/index.tsx +++ b/extension/src/popup/components/manageAssets/TrustlineError/index.tsx @@ -10,8 +10,11 @@ import { transactionSubmissionSelector, } from "popup/ducks/transactionSubmission"; +import { emitMetric } from "helpers/metrics"; import { getResultCodes, RESULT_CODES } from "popup/helpers/parseTransaction"; +import { METRIC_NAMES } from "popup/constants/metricsNames"; + import { Balances } from "@shared/api/types"; import "./styles.scss"; @@ -117,6 +120,10 @@ export const TrustlineError = ({ const { error } = useSelector(transactionSubmissionSelector); const [assetBalance, setAssetBalance] = useState(""); + useEffect(() => { + emitMetric(METRIC_NAMES.manageAssetError, { error }); + }, [error]); + useEffect(() => { if (!balances) return; const balance = balances[errorAsset]; diff --git a/extension/src/popup/components/sendPayment/SendAmount/SendType/index.tsx b/extension/src/popup/components/sendPayment/SendAmount/SendType/index.tsx index 3b3b4fcb75..0599aa6eaa 100644 --- a/extension/src/popup/components/sendPayment/SendAmount/SendType/index.tsx +++ b/extension/src/popup/components/sendPayment/SendAmount/SendType/index.tsx @@ -5,6 +5,8 @@ import { DetailsTooltip, Icon, TextLink } from "@stellar/design-system"; import { Button } from "popup/basics/buttons/Button"; import { navigateTo } from "popup/helpers/navigate"; +import { emitMetric } from "helpers/metrics"; +import { METRIC_NAMES } from "popup/constants/metricsNames"; import { ROUTES } from "popup/constants/routes"; import { PopupWrapper } from "popup/basics/PopupWrapper"; import { SubviewHeader } from "popup/components/SubviewHeader"; @@ -83,6 +85,11 @@ export const SendType = () => { values.paymentType === PAYMENT_TYPES.PATH_PAYMENT ? "native" : "", ), ); + emitMetric( + values.paymentType === PAYMENT_TYPES.PATH_PAYMENT + ? METRIC_NAMES.sendPaymentTypePathPayment + : METRIC_NAMES.sendPaymentTypePayment, + ); navigateTo(ROUTES.sendPaymentAmount); }; diff --git a/extension/src/popup/components/sendPayment/SendAmount/index.tsx b/extension/src/popup/components/sendPayment/SendAmount/index.tsx index a52ad44ca5..322c526afe 100644 --- a/extension/src/popup/components/sendPayment/SendAmount/index.tsx +++ b/extension/src/popup/components/sendPayment/SendAmount/index.tsx @@ -12,10 +12,12 @@ import { Button } from "popup/basics/buttons/Button"; import { PillButton } from "popup/basics/buttons/PillButton"; import { PopupWrapper } from "popup/basics/PopupWrapper"; import { ROUTES } from "popup/constants/routes"; +import { METRIC_NAMES } from "popup/constants/metricsNames"; import { AppDispatch } from "popup/App"; import { getAssetFromCanonical } from "helpers/stellar"; import { navigateTo } from "popup/helpers/navigate"; import { useNetworkFees } from "popup/helpers/useNetworkFees"; +import { emitMetric } from "helpers/metrics"; import { SubviewHeader } from "popup/components/SubviewHeader"; import { settingsNetworkDetailsSelector } from "popup/ducks/settings"; import { @@ -303,6 +305,7 @@ export const SendAmount = ({ previous }: { previous: ROUTES }) => {
{ + emitMetric(METRIC_NAMES.sendPaymentSetMax); formik.setFieldValue( "amount", calculateAvailBalance(formik.values.asset), diff --git a/extension/src/popup/components/sendPayment/SendConfirm/SubmitResult/index.tsx b/extension/src/popup/components/sendPayment/SendConfirm/SubmitResult/index.tsx index eb7c169abc..0be16d60d0 100644 --- a/extension/src/popup/components/sendPayment/SendConfirm/SubmitResult/index.tsx +++ b/extension/src/popup/components/sendPayment/SendConfirm/SubmitResult/index.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; import { Asset } from "stellar-sdk"; import get from "lodash/get"; @@ -24,6 +24,8 @@ import { import { FedOrGAddress } from "popup/basics/sendPayment/FedOrGAddress"; import "./styles.scss"; +import { emitMetric } from "helpers/metrics"; +import { METRIC_NAMES } from "popup/constants/metricsNames"; export const SubmitSuccess = ({ viewDetails }: { viewDetails: () => void }) => { const dispatch = useDispatch(); @@ -75,6 +77,10 @@ export const SubmitFail = () => { const horizonAsset = getAssetFromCanonical(asset); + useEffect(() => { + emitMetric(METRIC_NAMES.sendPaymentError, { error }); + }, [error]); + const decideError = () => { // unfunded destination if ( diff --git a/extension/src/popup/components/sendPayment/SendConfirm/TransactionDetails/index.tsx b/extension/src/popup/components/sendPayment/SendConfirm/TransactionDetails/index.tsx index 8e312a08ef..a8fcd21366 100644 --- a/extension/src/popup/components/sendPayment/SendConfirm/TransactionDetails/index.tsx +++ b/extension/src/popup/components/sendPayment/SendConfirm/TransactionDetails/index.tsx @@ -30,6 +30,8 @@ import { import { settingsNetworkDetailsSelector } from "popup/ducks/settings"; import { publicKeySelector } from "popup/ducks/accountServices"; import { navigateTo, openTab } from "popup/helpers/navigate"; +import { emitMetric } from "helpers/metrics"; +import { METRIC_NAMES } from "popup/constants/metricsNames"; import { SubviewHeader } from "popup/components/SubviewHeader"; import { FedOrGAddress } from "popup/basics/sendPayment/FedOrGAddress"; import { AccountAssets } from "popup/components/account/AccountAssets"; @@ -157,6 +159,16 @@ export const TransactionDetails = ({ goBack }: { goBack: () => void }) => { await dispatch( addRecentAddress({ publicKey: federationAddress || destination }), ); + + if (isPathPayment) { + emitMetric(METRIC_NAMES.sendPaymentPathPaymentSuccess, { + sourceAsset, + destAsset, + allowedSlippage, + }); + } else { + emitMetric(METRIC_NAMES.sendPaymentSuccess, { sourceAsset }); + } } } } catch (e) { diff --git a/extension/src/popup/components/sendPayment/SendTo/index.tsx b/extension/src/popup/components/sendPayment/SendTo/index.tsx index c11750ccf9..717aa97ade 100644 --- a/extension/src/popup/components/sendPayment/SendTo/index.tsx +++ b/extension/src/popup/components/sendPayment/SendTo/index.tsx @@ -13,7 +13,9 @@ import { SubviewHeader } from "popup/components/SubviewHeader"; import { IdenticonImg } from "popup/components/identicons/IdenticonImg"; import { InfoBlock } from "popup/basics/InfoBlock"; import { FormRows } from "popup/basics/Forms"; +import { emitMetric } from "helpers/metrics"; import { navigateTo } from "popup/helpers/navigate"; +import { METRIC_NAMES } from "popup/constants/metricsNames"; import { ROUTES } from "popup/constants/routes"; import { PopupWrapper } from "popup/basics/PopupWrapper"; import { Button } from "popup/basics/buttons/Button"; @@ -224,6 +226,7 @@ export const SendTo = ({ previous }: { previous: ROUTES }) => {
  • From d226474d72a8ea83915f302e6eace2986c4e3f89 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 17:23:34 -0400 Subject: [PATCH 24/25] docs(): bumping release to 2.1.2 (#513) Co-authored-by: GitHub Action --- extension/package.json | 4 ++-- extension/public/static/manifest.json | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/extension/package.json b/extension/package.json index 6b79517e0e..5b5f37f00a 100755 --- a/extension/package.json +++ b/extension/package.json @@ -1,6 +1,6 @@ { "name": "extension", - "version": "2.0.0", + "version": "2.1.2", "license": "Apache-2.0", "prettier": "@stellar/prettier-config", "scripts": { @@ -69,4 +69,4 @@ "webextension-polyfill-ts": "^0.19.0", "yup": "^0.29.1" } -} +} \ No newline at end of file diff --git a/extension/public/static/manifest.json b/extension/public/static/manifest.json index 4f069802ce..1b49c37c3a 100644 --- a/extension/public/static/manifest.json +++ b/extension/public/static/manifest.json @@ -1,7 +1,7 @@ { "name": "Freighter", - "version": "2.0.0", - "version_name": "2.0.0", + "version": "2.1.2", + "version_name": "2.1.2", "description": "Freighter is a non-custodial wallet extension that enables you to sign Stellar transactions via your browser.", "browser_specific_settings": { "gecko": { @@ -10,13 +10,19 @@ } }, "background": { - "scripts": ["background.min.js"], + "scripts": [ + "background.min.js" + ], "persistent": true }, "content_scripts": [ { - "matches": [""], - "js": ["contentScript.min.js"], + "matches": [ + "" + ], + "js": [ + "contentScript.min.js" + ], "run_at": "document_start" } ], @@ -36,4 +42,4 @@ "128": "images/icon128.png" }, "manifest_version": 2 -} +} \ No newline at end of file From f23644eee71eb3c32aa6804e51b875c970a47f0c Mon Sep 17 00:00:00 2001 From: Piyal Basu Date: Tue, 24 May 2022 17:28:37 -0400 Subject: [PATCH 25/25] Merge commit 'd226474d72a8ea83915f302e6eace2986c4e3f89' into release/2.2.0 # Conflicts: # extension/src/popup/components/manageAssets/ManageAssetRows/index.tsx --- .github/workflows/submitBeta.yml | 122 ++++++++++++++++++ ...bmitExtension.yml => submitProduction.yml} | 2 +- docs/docs/guide/usingFreighterBrowser.md | 10 +- extension/package.json | 2 +- extension/public/static/manifest.json | 4 +- .../manageAssets/ManageAssetRows/index.tsx | 10 +- extension/src/popup/helpers/useNetworkFees.ts | 4 +- extension/src/popup/views/Settings/index.tsx | 2 +- 8 files changed, 142 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/submitBeta.yml rename .github/workflows/{submitExtension.yml => submitProduction.yml} (99%) diff --git a/.github/workflows/submitBeta.yml b/.github/workflows/submitBeta.yml new file mode 100644 index 0000000000..54627a61f9 --- /dev/null +++ b/.github/workflows/submitBeta.yml @@ -0,0 +1,122 @@ +name: Beta Deployment +on: + workflow_dispatch: + inputs: + release: + description: Release Number + default: "2.0.0" + required: true + version: + description: Beta version + default: "0" + required: true +jobs: + bump-version: + name: Bump Package Version and Submit Extension + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: release/${{ github.event.inputs.release }} + - name: Update manifest.json name + uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + with: + file: ./extension/public/static/manifest.json + field: name + value: Freighter BETA + - name: Update manifest.json version_name + uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + with: + file: ./extension/public/static/manifest.json + field: version_name + value: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + - name: Update manifest.json version for Chrome + uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + with: + file: ./extension/public/static/manifest.json + field: version + value: ${{ github.event.inputs.release }}.${{ github.event.inputs.version }} + - name: Build extension + uses: actions/setup-node@v1 + with: + node-version: "12" + - run: yarn install && yarn build:freighter-api && yarn build:extension:production + - name: Install zip + uses: montudor/action-zip@c25e01d7489d0274569440a2f0281b4569df16bc #v0.1.1 + - name: Zip extension build + run: zip -qq -r ./build.zip * + working-directory: ./extension/build + # - name: Create GitHub Release + # id: create_release + # uses: actions/create-release@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # tag_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + # release_name: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + # body: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} + # draft: false + # prerelease: true + # - name: Upload Release Asset + # id: upload-release-asset + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ./extension/build/build.zip + # asset_name: build-${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.zip + # asset_content_type: application/zip + # - name: Update built manifest.json version for Firefox + # uses: jossef/action-set-json-field@6e6d7e639f24b3955ef682815317b5613ac6ca12 #v1 + # with: + # file: ./extension/build/manifest.json + # field: version + # value: ${{ github.event.inputs.release }}beta${{ github.event.inputs.version }} + # - name: Build xpi for Firefox + # id: firefox-build + # uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 + # with: + # cmd: build + # source: ./extension/build + # filename: ${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}.xpi + # - name: Sign extension for Firefox + # id: firefox-sign + # uses: kewisch/action-web-ext@20ee9837f7352d4770b93868a0aa59292eb43d8c #v1 + # with: + # cmd: sign + # source: ${{ steps.firefox-build.outputs.target }} + # channel: unlisted + # apiKey: ${{ secrets.AMO_SIGN_KEY }} + # apiSecret: ${{ secrets.AMO_SIGN_SECRET }} + # timeout: 1800000 + # - name: Upload Firefox xpi + # uses: actions/upload-release-asset@v1 + # env: + # GITHUB_TOKEN: ${{ github.token }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ${{ steps.firefox-sign.outputs.target }} + # asset_name: ${{ github.event.inputs.release }}-${{ github.event.inputs.version }}.xpi + # asset_content_type: application/xpi + - name: Submit extension to Chrome + uses: mnao305/chrome-extension-upload@4061bc03cde1feaec8b153654495c88857fb76c3 #v2.2.0 + with: + file-path: ./extension/build/build.zip + extension-id: "kcigoalhjaghfigblagmiopnefgenfjb" + client-id: ${{ secrets.EXTENSION_CLIENT_ID_V2 }} + refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN_V2 }} + publish: true + publish-target: trustedTesters + - name: Slack Notification + uses: rtCamp/action-slack-notify@4d4ce0d91186ffe6633a8cda645146d38e88228b #v2 + env: + MSG_MINIMAL: true + SLACK_CHANNEL: proj-freighter + SLACK_COLOR: "#391EDA" + SLACK_ICON: https://github.com/stellar/freighter/blob/master/docs/static/images/logo.png?size=48 + SLACK_MESSAGE: "https://github.com/stellar/freighter/releases/tag/{{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }}" + SLACK_TITLE: Freighter v${{ github.event.inputs.release }}-beta.${{ github.event.inputs.version }} has been submitted for testing! + SLACK_USERNAME: Freighter Administrative Assistant + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/submitExtension.yml b/.github/workflows/submitProduction.yml similarity index 99% rename from .github/workflows/submitExtension.yml rename to .github/workflows/submitProduction.yml index 30436a4a52..b5aaefd7b3 100644 --- a/.github/workflows/submitExtension.yml +++ b/.github/workflows/submitProduction.yml @@ -1,4 +1,4 @@ -name: Submit extension to browser store +name: Production Deployment on: workflow_dispatch: inputs: diff --git a/docs/docs/guide/usingFreighterBrowser.md b/docs/docs/guide/usingFreighterBrowser.md index ad80ec6f62..1b1e733a8c 100644 --- a/docs/docs/guide/usingFreighterBrowser.md +++ b/docs/docs/guide/usingFreighterBrowser.md @@ -65,7 +65,7 @@ const retrievePublicKey = async () => { return publicKey; }; -const result = retrievePublicKey(); +const result = await retrievePublicKey(); ``` ### getNetwork @@ -96,7 +96,7 @@ const retrieveNetwork = async () => { return network; }; -const result = retrieveNetwork(); +const result = await retrieveNetwork(); ``` ### signTransaction @@ -135,7 +135,7 @@ const retrievePublicKey = async () => { return publicKey; }; -const retrievedPublicKey = retrievePublicKey(); +const retrievedPublicKey = await retrievePublicKey(); const userSignTransaction = async (xdr: string, network: string) => { let signedTransaction = ""; @@ -155,7 +155,7 @@ const userSignTransaction = async (xdr: string, network: string) => { }; const xdr = ""; // replace this with an xdr string of the transaction you want to sign -const userSignedTransaction = userSignTransaction(xdr, "TESTNET"); +const userSignedTransaction = await userSignTransaction(xdr, "TESTNET"); ``` freighter-api will return a signed transaction xdr. Below is an example of how you might submit this signed transaction to Horizon using `stellar-sdk` (https://github.com/stellar/js-stellar-sdk): @@ -180,7 +180,7 @@ const userSignTransaction = async (xdr: string, network: string) => { const xdr = ""; // replace this with an xdr string of the transaction you want to sign -const userSignedTransaction = userSignTransaction(xdr, "TESTNET"); +const userSignedTransaction = await userSignTransaction(xdr, "TESTNET"); const SERVER_URL = "https://horizon-testnet.stellar.org"; diff --git a/extension/package.json b/extension/package.json index 6b79517e0e..b484f2b925 100755 --- a/extension/package.json +++ b/extension/package.json @@ -1,6 +1,6 @@ { "name": "extension", - "version": "2.0.0", + "version": "2.1.2", "license": "Apache-2.0", "prettier": "@stellar/prettier-config", "scripts": { diff --git a/extension/public/static/manifest.json b/extension/public/static/manifest.json index 4f069802ce..4b1af5ef92 100644 --- a/extension/public/static/manifest.json +++ b/extension/public/static/manifest.json @@ -1,7 +1,7 @@ { "name": "Freighter", - "version": "2.0.0", - "version_name": "2.0.0", + "version": "2.1.2", + "version_name": "2.1.2", "description": "Freighter is a non-custodial wallet extension that enables you to sign Stellar transactions via your browser.", "browser_specific_settings": { "gecko": { diff --git a/extension/src/popup/components/manageAssets/ManageAssetRows/index.tsx b/extension/src/popup/components/manageAssets/ManageAssetRows/index.tsx index 1adf9c12fc..67e4a61df2 100644 --- a/extension/src/popup/components/manageAssets/ManageAssetRows/index.tsx +++ b/extension/src/popup/components/manageAssets/ManageAssetRows/index.tsx @@ -8,7 +8,12 @@ import { AppDispatch } from "popup/App"; import { emitMetric } from "helpers/metrics"; import { navigateTo } from "popup/helpers/navigate"; -import { getCanonicalFromAsset, formatDomain } from "helpers/stellar"; +import { useNetworkFees } from "popup/helpers/useNetworkFees"; +import { + formatDomain, + getCanonicalFromAsset, + xlmToStroop, +} from "helpers/stellar"; import { PillButton } from "popup/basics/buttons/PillButton"; @@ -53,6 +58,7 @@ export const ManageAssetRows = ({ } = useSelector(transactionSubmissionSelector); const [assetSubmitting, setAssetSubmitting] = useState(""); const dispatch: AppDispatch = useDispatch(); + const { recommendedFee } = useNetworkFees(); const server = new StellarSdk.Server(networkDetails.networkUrl); @@ -68,7 +74,7 @@ export const ManageAssetRows = ({ setAssetSubmitting(canonicalAsset); const transactionXDR = new StellarSdk.TransactionBuilder(sourceAccount, { - fee: StellarSdk.BASE_FEE, + fee: xlmToStroop(recommendedFee).toString(), networkPassphrase: networkDetails.networkPassphrase, }) .addOperation( diff --git a/extension/src/popup/helpers/useNetworkFees.ts b/extension/src/popup/helpers/useNetworkFees.ts index 538c5657a5..9800333128 100644 --- a/extension/src/popup/helpers/useNetworkFees.ts +++ b/extension/src/popup/helpers/useNetworkFees.ts @@ -23,10 +23,10 @@ export const useNetworkFees = () => { try { const server = new StellarSdk.Server(networkUrl); const { - fee_charged: feeCharged, + max_fee: maxFee, ledger_capacity_usage: ledgerCapacityUsage, } = await server.feeStats(); - setRecommendedFee(stroopToXlm(feeCharged.mode).toString()); + setRecommendedFee(stroopToXlm(maxFee.mode).toString()); if (ledgerCapacityUsage > 0.5 && ledgerCapacityUsage <= 0.75) { setNetworkCongestion(NetworkCongestion.MEDIUM); } else if (ledgerCapacityUsage > 0.75) { diff --git a/extension/src/popup/views/Settings/index.tsx b/extension/src/popup/views/Settings/index.tsx index e20270eb7c..a81d618f7d 100644 --- a/extension/src/popup/views/Settings/index.tsx +++ b/extension/src/popup/views/Settings/index.tsx @@ -31,7 +31,7 @@ export const Settings = () => { Settings
    {/* TODO: Make this dynamic */} - v2.0.0 + v2.1.2