Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
747a6d6
frontend: show coinfinity logo when requesting address
thisconnect Oct 14, 2025
52fe42d
Merge branch 'frontend-add-coinfinity'
thisconnect Oct 14, 2025
f404393
backend/bitbox02: bundle v9.23.3 firmwares
benma Oct 13, 2025
e4ef78a
backend: update to version 4.48.8
benma Oct 13, 2025
5dcf609
backend/bitbox02: cleanup bundled firmware hash files
benma Oct 13, 2025
18b9f3d
backend: update decimal formatting for stablecoin txs
strmci Oct 15, 2025
748d72d
Merge branch 'update_stablecoin_decimal_formatting'
strmci Oct 15, 2025
c71b208
maintenance: do not call feeTargets for Sepolia.
bznein Oct 15, 2025
a1162a9
Merge branch 'merge-v4.48.8'
benma Oct 15, 2025
1a3123e
backend: update to version 4.49.0
benma Oct 15, 2025
7f39037
backend/bitbox02: bundle v9.24.0 firmwares
benma Oct 15, 2025
55f241f
frontend: prefer 'type' over 'interface' for safer type definitions
thisconnect Oct 9, 2025
14da86d
frontend: add import type and fix indentation
thisconnect Oct 9, 2025
5788527
frontend: minor formatting cleanup
thisconnect Oct 9, 2025
bdcfc0d
Merge branch 'feeTargetsSepolia'
bznein Oct 15, 2025
d522a03
docs: explain how to run the app in simulator mode.
bznein Oct 15, 2025
41769a9
Merge branch 'update'
benma Oct 15, 2025
febfa4d
maintenance: only check if an account is used if not already set.
bznein Oct 15, 2025
a53aaa9
Merge branch 'discoverAccountTx'
bznein Oct 15, 2025
8a0138f
frontend: change interface to type
thisconnect Oct 9, 2025
ebdafeb
frontend: type accounts with nonemptyarray helper
thisconnect Oct 9, 2025
4d8e1bb
frontend: update import type and export
thisconnect Oct 9, 2025
e8aa5f1
frontend: remove unused type
thisconnect Oct 15, 2025
12e6e60
Merge branch 'frontend-consistent-types'
thisconnect Oct 15, 2025
2979ebc
frontend: change eslint intend to stylistic/indent
thisconnect Oct 15, 2025
f272008
Merge branch 'simulatorAppDocs'
bznein Oct 15, 2025
c58e217
frontend: fix stylistic/indent rules by make webfix
thisconnect Oct 15, 2025
f2375ba
frontend: change eslint semi to stylistic/semi
thisconnect Oct 15, 2025
e3b8f3e
ios: revert team ID
benma Oct 15, 2025
8e20409
frontend: fix stylistic/semi rules by make webfix
thisconnect Oct 15, 2025
8654128
Merge branch 'team' into release-v4.49.0
benma Oct 16, 2025
50b91de
frontend: add eslint stylistic/member-delimiter-style
thisconnect Oct 16, 2025
b60ccf5
frontend: fix tylistic/member-delimiter-style rules by make webfix
thisconnect Oct 16, 2025
91c8611
Merge branch 'frontend-lint-with-stylistic'
thisconnect Oct 16, 2025
f5c1831
tests: add watch-only tests 1 and 2 to playwright.
bznein Oct 20, 2025
d680a66
tests: add simulator support to CI's workflow.
bznein Oct 20, 2025
7146714
chore: make sure linter runs on tests files.
bznein Oct 20, 2025
40bd670
qt/windows: don't link libssp
benma Oct 20, 2025
852de7c
Merge branch 'playwrightTests'
bznein Oct 20, 2025
a726ea0
Merge branch 'no-ssp'
benma Oct 20, 2025
72b248a
centralize version in VERSION file
Oct 20, 2025
c07ee14
Merge remote-tracking branch 'benma/centralize-version'
benma Oct 20, 2025
122d123
android: use version from APP_VERSION file
Oct 20, 2025
f2172fc
android: drop `android-` prefix form versionName
benma Oct 20, 2025
64eb82b
Merge branch 'centralize-version-android'
benma Oct 21, 2025
be97675
ios: use version from APP_VERSION file
Oct 20, 2025
d6e996e
Merge branch 'centralize-version-ios'
benma Oct 21, 2025
1a1e825
macOS: use version from APP_VERSION file
Oct 21, 2025
021d9bc
chore: disallow simulator together with mainnet in servewallet.
bznein Oct 16, 2025
ecaeec4
windows: use version from APP_VERSION file
Oct 21, 2025
0de6994
Merge branch 'simulatorMainnetServewallet'
bznein Oct 21, 2025
0be3526
feat: allow Qt app to talk to the simulator.
bznein Oct 16, 2025
beb5dc5
Merge branch 'centralize-version-windows'
benma Oct 21, 2025
f60c5e7
docker: increase version and fix image build bug
Beerosagos Oct 21, 2025
5306b89
frontend: refactor market component to use view
thisconnect Oct 20, 2025
cc7b2a9
frontend: split market and deals css into separate css modules
thisconnect Oct 21, 2025
107bfe0
frontend: cleanup market stylesheet
thisconnect Oct 21, 2025
a9ca275
tests: add testnet mode toggle test.
bznein Oct 16, 2025
c68e031
Merge branch 'testnetTest'
bznein Oct 21, 2025
9d95a77
frontend: fix supress esc key when confirming an address
thisconnect Oct 21, 2025
75dc7fc
Merge branch 'frontend-market-view-refactor'
thisconnect Oct 21, 2025
a0ab165
Merge branch 'centralize-version-macos'
benma Oct 22, 2025
3e4fc1f
Merge branch 'simulatorQT'
bznein Oct 22, 2025
939e2a7
Merge branch 'frontend-esc-receive' into release-v4.49.0
thisconnect Oct 22, 2025
3e6913f
fronted: make locize-fix
Beerosagos Oct 22, 2025
28862d2
frontend: fix red dot appearing wrong position on bottom nav
shonsirsha Oct 22, 2025
0114692
ios: fix red button not appearing on bottom nav & more screen
shonsirsha Oct 22, 2025
41cd0d0
Merge branch 'frontend-fix-mobile-red-dot' into release-v4.49.0
shonsirsha Oct 22, 2025
025696c
frontend: fix focus in dialog with multiple input fields
thisconnect Oct 22, 2025
f811fe7
update KYC/AML Pocket terms
strmci Oct 22, 2025
f7df9c0
Merge branch 'update_pocket_kyc_terms' into release-v4.49.0
strmci Oct 22, 2025
76d1fd1
Merge branch 'frontend-fix-focus-multiple-inputs' into release-v4.49.0
thisconnect Oct 23, 2025
f22cb0d
frontend: refactor message and remove small and title props
thisconnect Oct 23, 2025
25db6e3
Merge branch 'docker-version-bug'
Beerosagos Oct 23, 2025
5e78a5a
Merge branch 'frontend-cleanup-message'
thisconnect Oct 23, 2025
4640f3e
update Pocket info content
strmci Oct 24, 2025
c499c9f
Merge branch 'update_pocket_info_content' into release-v4.49.0
strmci Oct 24, 2025
0449bfe
frontend: cleanup and remove unused css variables
thisconnect Oct 24, 2025
23095d1
frontend: remove rarely used css variables
thisconnect Oct 24, 2025
aa1cce7
changelog: move mempool.space change to 4.49.0
thisconnect Oct 24, 2025
ecc0790
changelog: move bitrefill change to 4.49.0
thisconnect Oct 24, 2025
e4a9e0c
frontend: make locize-pull
benma Oct 23, 2025
fd480ea
Merge branch 'changelog-fixes' into release-v4.49.0
thisconnect Oct 27, 2025
b93902f
Merge branch 'locize2'
benma Oct 27, 2025
ac863e2
Merge remote-tracking branch 'pull/release-v4.49.0'
benma Oct 27, 2025
cd93cc4
frontend: rename css variable
thisconnect Oct 24, 2025
d23c6a5
frontend: remove css variable that was only used once
thisconnect Oct 24, 2025
e9bc75c
frontend: deprecate --size-wizard-text variable
thisconnect Oct 24, 2025
5e639f7
Merge branch 'frontend-cleanup-css'
thisconnect Oct 28, 2025
21ebd32
tests: add GapLimits e2e test.
bznein Oct 23, 2025
3c84505
Merge branch 'gapLimitsE2Etest'
bznein Oct 29, 2025
3b0ad56
Merge remote-tracking branch 'upstream/master' into staging-send-to-s…
thisconnect Oct 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .containerversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
33
34
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ jobs:
- name: Build Windows app
run: |
make qt-windows
cd frontends/qt
makensis setup.nsi
- name: Upload Installer
id: upload
uses: actions/upload-artifact@v4
Expand Down
65 changes: 63 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,66 @@ on:
workflow_dispatch:

jobs:
compute-version:
name: Compute firmware container version
runs-on: ubuntu-latest
outputs:
firmware_version: ${{ steps.get_version.outputs.firmware_version }}
steps:
- name: Checkout firmware repo
uses: actions/checkout@v4
with:
repository: BitBoxSwiss/bitbox02-firmware
path: bitbox02-firmware

- name: Read .containerversion
id: get_version
run: |
version=$(cat bitbox02-firmware/.containerversion)
echo "Firmware version: $version"
echo "firmware_version=$version" >> $GITHUB_OUTPUT

build-simulator:
name: Build simulator in container
runs-on: ubuntu-latest
needs: compute-version
container:
image: shiftcrypto/firmware_v2:${{ needs.compute-version.outputs.firmware_version }}
steps:
- name: Checkout firmware repo
uses: actions/checkout@v4
with:
repository: BitBoxSwiss/bitbox02-firmware
submodules: true
path: bitbox02-firmware

- name: Fetch tags
working-directory: bitbox02-firmware
run: git fetch --tags

- name: Build simulator
working-directory: bitbox02-firmware
run: make simulator

- name: Upload simulator binary
uses: actions/upload-artifact@v4
with:
name: simulator-binary
path: bitbox02-firmware/build-build-noasan/bin/simulator

run-tests:
runs-on: ubuntu-latest
needs: build-simulator
steps:
- uses: actions/checkout@v3

- name: Download simulator artifact
uses: actions/download-artifact@v4
with:
name: simulator-binary
path: ./simulator-bin


- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -28,13 +83,19 @@ jobs:
- name: Install Playwright browsers
run: |
cd frontends/web
npx playwright install --with-deps
npx playwright install --with-deps chromium webkit


- name: Restore executable permission
run: chmod +x simulator-bin/simulator

- name: Run Playwright tests
env:
SIMULATOR_PATH: ${{ github.workspace }}/simulator-bin/simulator
run: make webe2etest

- name: Upload Playwright artifacts
if: failure()
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-artifacts
Expand Down
1 change: 1 addition & 0 deletions APP_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.49.0
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog

## Unreleased
- Add a dropdown on the "Receiver address" input in the send screen to select an account

## v4.49.0
- macOS: fix potential USB communication issue with BitBox02 bootloaders <v1.1.2 and firmwares <v9.23.1
- Added BTC Direct sell option
- Added a banner to remind user to backup their seed phrase when an account reaches a certain threshold.
Expand All @@ -21,19 +24,23 @@
- More efficient account initialization by fetching all account Bitcoin xpubs at once
- Enable search transactions by note, address, or txid
- Move "Export" (export transactions) to account info page
- Add a dropdown on the "Receiver address" input in the send screen to select an account
- Show coinfinty logo when requesting an address
- Update decimal formatting for stablecoin transactions
- Change block explorer to mempool.space
- Integrate Bitrefill and add spending section

## v4.48.8
- Bundle BitBox02 Nova firmware version v9.23.3

## v4.48.7
- ios: fix Pocket user verification button
- Change block explorer to mempool.space

## v4.48.6
- Android: restore support for Android 6 and Android 5

## v4.48.5
- Bundle BitBox02 firmware version v9.23.2
- iOS: fix wrong timezone when confirming time on BitBox02 (it would always show the time in UTC)
- Integrate Bitrefill and add spending section

## v4.48.4
- macOS: fix potential USB communication issue with BitBox02 bootloaders <v1.1.2 and firmwares <v9.23.1
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN --mount=target=/mnt,source=scripts DEBIAN_FRONTEND=noninteractive /mnt/docke
ARG SYS_GOPATH=/opt/go
ENV PATH=${SYS_GOPATH}/bin:/usr/local/go/bin:$PATH

RUN --mount=target=/mnt/Makefile,source=Makefile GOPATH=${SYS_GOPATH} make -C /mnt envinit
RUN --mount=target=/mnt/Makefile,source=Makefile --mount=target=/mnt/version.mk.inc,source=version.mk.inc GOPATH=${SYS_GOPATH} make -C /mnt envinit

ENV PATH=/opt/qt6/6.8.2/gcc_64/bin:/opt/qt6/6.8.2/gcc_64/libexec:$PATH

Expand Down
17 changes: 12 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
SHELL := /bin/bash
WEBROOT := frontends/web

include version.mk.inc

GO_LDFLAGS := $(GO_VERSION_LDFLAGS)
GO_RUN := go run -mod=vendor -ldflags "$(GO_LDFLAGS)"

catch:
@echo "Choose a make target."
envinit:
Expand All @@ -28,15 +33,17 @@ gomobileinit:
git clone https://github.com/BitBoxSwiss/mobile.git /tmp/mobile && cd /tmp/mobile/cmd/gomobile && go install .
gomobile init
servewallet:
go run -mod=vendor ./cmd/servewallet
$(GO_RUN) ./cmd/servewallet
servewallet-mainnet:
go run -mod=vendor ./cmd/servewallet -mainnet
$(GO_RUN) ./cmd/servewallet -mainnet
servewallet-regtest:
rm -f appfolder.dev/cache/headers-rbtc.bin && rm -rf appfolder.dev/cache/account-*rbtc* && go run -mod=vendor ./cmd/servewallet -regtest
rm -f appfolder.dev/cache/headers-rbtc.bin && rm -rf appfolder.dev/cache/account-*rbtc* && $(GO_RUN) ./cmd/servewallet -regtest
servewallet-prodservers:
go run -mod=vendor ./cmd/servewallet -devservers=false
$(GO_RUN) ./cmd/servewallet -devservers=false
servewallet-mainnet-prodservers:
go run -mod=vendor ./cmd/servewallet -mainnet -devservers=false
$(GO_RUN) ./cmd/servewallet -mainnet -devservers=false
servewallet-simulator:
$(GO_RUN) ./cmd/servewallet -simulator=true
buildweb:
node --version
npm --version
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,27 @@ Run `make servewallet` and `make webdev` in seperate terminals.
Before the first use of `make webdev`, you also need to run `make buildweb`, to install the dev
dependencies.

#### Local development with BB02 simulator

The app can be used together with a [BB02 simulator](https://github.com/BitBoxSwiss/bitbox02-firmware/tree/master/test/simulator).

In order to do so:

* Build the simulator (checkout https://github.com/BitBoxSwiss/bitbox02-firmware/, then from the root repo run `make dockerdev` followed by `make simulator`)

* Execute the simulator.

* Use `--port` if you want it to listen to a custom port (default is 15423)

* Set the environment variable `FAKE_MEMORY_FILEPATH` to a filepath if you want the simulator to write to file rather than in memory. This allows to re-use the same seed across different executions.

* Launch the BBApp in simulator mode by providing a custom flag `--simulator`.


If the simulator is listening on a custom port, `--simulatorPort=<port>` must also be provided.

Note: the simulator is currently only supported in the servewallet and in the Qt app and only when the app runs in testnet mode.

#### Watch and build the UI

Run `make webdev` to develop the UI inside a web browser (for quick development, automatic rebuilds
Expand Down
23 changes: 13 additions & 10 deletions backend/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -1722,20 +1722,23 @@ func (backend *Backend) checkAccountUsed(account accounts.Interface) {
return
}
}

log := backend.log.WithField("accountCode", account.Config().Config.Code)
txs, err := account.Transactions()
if err != nil {
log.WithError(err).Error("discoverAccount")
return
}
if !account.Config().Config.Used {
txs, err := account.Transactions()
if err != nil {
log.WithError(err).Error("discoverAccount")
return
}

if len(txs) == 0 {
// Invoke this here too because even if an account is unused, we scan up to 5 accounts.
backend.maybeAddHiddenUnusedAccounts()
return
if len(txs) == 0 {
// Invoke this here too because even if an account is unused, we scan up to 5 accounts.
backend.maybeAddHiddenUnusedAccounts()
return
}
}
log.Info("marking account as used")
err = backend.config.ModifyAccountsConfig(func(accountsConfig *config.AccountsConfig) error {
err := backend.config.ModifyAccountsConfig(func(accountsConfig *config.AccountsConfig) error {
acct := accountsConfig.Lookup(account.Config().Config.Code)
if acct == nil {
return errp.Newf("could not find account")
Expand Down
58 changes: 58 additions & 0 deletions backend/accounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"time"

"github.com/BitBoxSwiss/bitbox-wallet-app/backend/accounts"
accountsMocks "github.com/BitBoxSwiss/bitbox-wallet-app/backend/accounts/mocks"
accountsTypes "github.com/BitBoxSwiss/bitbox-wallet-app/backend/accounts/types"
"github.com/BitBoxSwiss/bitbox-wallet-app/backend/coins/btc"
"github.com/BitBoxSwiss/bitbox-wallet-app/backend/coins/btc/addresses"
Expand Down Expand Up @@ -1676,3 +1677,60 @@ func TestAccountsFiatAndCoinBalance(t *testing.T) {
}

}

func TestCheckAccountUsed(t *testing.T) {
b := newBackend(t, testnetDisabled, regtestDisabled)
b.tstCheckAccountUsed = nil
defer b.Close()
accountMocks := map[accountsTypes.Code]*accountsMocks.InterfaceMock{}
// A Transactions function that always returns one transaction, so the account is always used.
txFunc := func() (accounts.OrderedTransactions, error) {
return accounts.OrderedTransactions{&accounts.TransactionData{}}, nil
}

b.makeBtcAccount = func(config *accounts.AccountConfig, coin *btc.Coin, gapLimits *types.GapLimits, getAddress func(coinpkg.Code, blockchain.ScriptHashHex) (*addresses.AccountAddress, error), log *logrus.Entry) accounts.Interface {
accountMock := MockBtcAccount(t, config, coin, gapLimits, log)
accountMock.TransactionsFunc = txFunc
accountMocks[config.Config.Code] = accountMock
return accountMock
}

b.makeEthAccount = func(config *accounts.AccountConfig, coin *eth.Coin, httpClient *http.Client, log *logrus.Entry) accounts.Interface {
accountMock := MockEthAccount(config, coin, httpClient, log)
accountMock.TransactionsFunc = txFunc
accountMocks[config.Config.Code] = accountMock
return accountMock
}

ks1 := makeBitBox02Multi()

ks1Fingerprint, err := ks1.RootFingerprint()
require.NoError(t, err)

b.registerKeystore(ks1)
require.NoError(t, b.SetWatchonly(ks1Fingerprint, true))

accountsByKestore, err := b.AccountsByKeystore()
require.NoError(t, err)

accountList, ok := accountsByKestore[hex.EncodeToString(ks1Fingerprint)]
require.True(t, ok, "Expected accounts for keystore with fingerprint %s", hex.EncodeToString(ks1Fingerprint))

// Check all accounts, make sure they are set as used.
for _, acct := range accountList {
mock, ok := accountMocks[acct.Config().Config.Code]
require.True(t, ok, "No mock for account %s", acct.Config().Config.Code)

b.checkAccountUsed(acct)
// Ensure that Transactions is called
require.Len(t, mock.TransactionsCalls(), 1)
require.True(t, acct.Config().Config.Used)

// Call checkAccountUsed again, Transactions should not be called again.
b.checkAccountUsed(acct)
require.Len(t, mock.TransactionsCalls(), 1)
// And Used should still be true.
require.True(t, acct.Config().Config.Used)
}

}
3 changes: 2 additions & 1 deletion backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import (
"github.com/BitBoxSwiss/bitbox-wallet-app/backend/keystore"
"github.com/BitBoxSwiss/bitbox-wallet-app/backend/keystore/software"
"github.com/BitBoxSwiss/bitbox-wallet-app/backend/rates"
"github.com/BitBoxSwiss/bitbox-wallet-app/backend/versioninfo"
utilConfig "github.com/BitBoxSwiss/bitbox-wallet-app/util/config"
"github.com/BitBoxSwiss/bitbox-wallet-app/util/errp"
"github.com/BitBoxSwiss/bitbox-wallet-app/util/locker"
Expand All @@ -66,7 +67,7 @@ import (
)

func init() {
electrum.SetClientSoftwareVersion(Version)
electrum.SetClientSoftwareVersion(versioninfo.Version)
}

// fixedURLWhitelist is always allowed by SystemOpen, in addition to some
Expand Down
9 changes: 8 additions & 1 deletion backend/bridgecommon/bridgecommon.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/BitBoxSwiss/bitbox-wallet-app/backend/devices/bluetooth"
"github.com/BitBoxSwiss/bitbox-wallet-app/backend/devices/usb"
"github.com/BitBoxSwiss/bitbox-wallet-app/backend/handlers"
"github.com/BitBoxSwiss/bitbox-wallet-app/backend/versioninfo"
"github.com/BitBoxSwiss/bitbox-wallet-app/util/config"
"github.com/BitBoxSwiss/bitbox-wallet-app/util/errp"
"github.com/BitBoxSwiss/bitbox-wallet-app/util/jsonp"
Expand Down Expand Up @@ -286,6 +287,7 @@ func (env *BackendEnvironment) BluetoothConnect(identifier string) {
// Serve serves the BitBox API for use in a native client.
func Serve(
testnet bool,
simulator bool,
gapLimits *btctypes.GapLimits,
communication NativeCommunication,
backendEnvironment backend.Environment) {
Expand All @@ -301,9 +303,14 @@ func Serve(
log.Info("--------------- Started application --------------")
log.WithField("goos", runtime.GOOS).
WithField("goarch", runtime.GOARCH).
WithField("version", backend.Version).
WithField("version", versioninfo.Version).
Info("environment")

if simulator {
log.Info("Simulator mode enabled, ensuring testnet mode is enabled")
testnet = true
}

var err error
globalBackend, err = backend.NewBackend(
arguments.NewArguments(
Expand Down
2 changes: 2 additions & 0 deletions backend/bridgecommon/bridgecommon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func (e environment) BluetoothConnect(string) {}
// TestServeShutdownServe checks that you can call Serve twice in a row.
func TestServeShutdownServe(t *testing.T) {
bridgecommon.Serve(
false,
false,
nil,
communication{},
Expand All @@ -88,6 +89,7 @@ func TestServeShutdownServe(t *testing.T) {
done := make(chan struct{})
go func() {
bridgecommon.Serve(
false,
false,
nil,
communication{},
Expand Down
10 changes: 6 additions & 4 deletions backend/coins/eth/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,13 @@ func (account *Account) SendTx(txNote string) (string, error) {
// If the service should not be reachable, we fallback to only one priority, estimated by
// the ETH RPC eth_gasPrice endpoint.
func (account *Account) feeTargets() []*ethtypes.FeeTarget {
etherscanFeeTargets, err := account.coin.client.FeeTargets(context.TODO())
if err == nil {
return etherscanFeeTargets
if account.coin.code != coin.CodeSEPETH {
etherscanFeeTargets, err := account.coin.client.FeeTargets(context.TODO())
if err == nil {
return etherscanFeeTargets
}
account.log.WithError(err).Error("Could not get fee targets from eth gas station, falling back to RPC eth_gasPrice")
}
account.log.WithError(err).Error("Could not get fee targets from eth gas station, falling back to RPC eth_gasPrice")
suggestedGasPrice, err := account.coin.client.SuggestGasPrice(context.TODO())
if err != nil {
account.log.WithError(err).Error("Fallback to RPC eth_gasPrice failed")
Expand Down
Loading