Skip to content

Commit

Permalink
Merge branch 'remove_no_priority'
Browse files Browse the repository at this point in the history
  • Loading branch information
strmci committed Nov 7, 2024
2 parents a4c11d4 + d84218e commit bd876f6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Add BTC Direct private trading desk information
- Android: fix stuck back button after closing a dialog
- Fix authentication view glitch at startup
- Remove "No priority" from fee options

# 4.45.0
- Bundle BitBox02 firmware version v9.21.0
Expand Down
7 changes: 0 additions & 7 deletions backend/accounts/feetarget.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func NewFeeTargetCode(code string) (FeeTargetCode, error) {
case string(FeeTargetCodeMempoolFastest):
case string(FeeTargetCodeMempoolHalfHour):
case string(FeeTargetCodeMempoolHour):
case string(FeeTargetCodeMempoolEconomy):
default:
return "", errp.WithStack(errp.Newf("Unrecognized fee target code %s", code))
}
Expand Down Expand Up @@ -72,9 +71,6 @@ const (
// FeeTargetCodeMempoolHour is the mempool hour fee target.
FeeTargetCodeMempoolHour FeeTargetCode = "mHour"

// FeeTargetCodeMempoolEconomy is the mempool economy fee target.
FeeTargetCodeMempoolEconomy FeeTargetCode = "mEconomy"

// FeeTargetCodeCustom means that the actual feerate is supplied separately instead of being
// estimated automatically.
FeeTargetCodeCustom FeeTargetCode = "custom"
Expand All @@ -92,7 +88,6 @@ type MempoolSpaceFees struct {
FastestFee int64 `json:"fastestFee"`
HalfHourFee int64 `json:"halfHourFee"`
HourFee int64 `json:"hourFee"`
EconomyFee int64 `json:"economyFee"`
MinimumFee int64 `json:"minimumFee"`
}

Expand All @@ -106,8 +101,6 @@ func (fees MempoolSpaceFees) GetFeeRate(code FeeTargetCode) btcutil.Amount {
feeRatePerByte = fees.HalfHourFee
case FeeTargetCodeMempoolHour:
feeRatePerByte = fees.HourFee
case FeeTargetCodeMempoolEconomy:
feeRatePerByte = fees.EconomyFee
}
return btcutil.Amount(feeRatePerByte * 1000)
}
1 change: 0 additions & 1 deletion backend/coins/btc/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ func (account *Account) feeTargets() FeeTargets {
var feeTargets FeeTargets
if mempoolFees != nil {
feeTargets = FeeTargets{
{blocks: 12, code: accounts.FeeTargetCodeMempoolEconomy},
{blocks: 3, code: accounts.FeeTargetCodeMempoolHour},
{blocks: 2, code: accounts.FeeTargetCodeMempoolHalfHour},
{blocks: 1, code: accounts.FeeTargetCodeMempoolFastest},
Expand Down
8 changes: 2 additions & 6 deletions backend/coins/btc/feetarget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ func TestFeeTargets(t *testing.T) {

// non-empty slice, with all nil feeRates
feeTargets = FeeTargets{
{blocks: 12, code: accounts.FeeTargetCodeMempoolEconomy},
{blocks: 3, code: accounts.FeeTargetCodeMempoolHour},
{blocks: 2, code: accounts.FeeTargetCodeMempoolHalfHour},
{blocks: 1, code: accounts.FeeTargetCodeMempoolFastest},
Expand All @@ -72,7 +71,6 @@ func TestFeeTargets(t *testing.T) {

// non-empty slice, with all nil feeRates
feeTargets = FeeTargets{
{blocks: 12, code: accounts.FeeTargetCodeMempoolEconomy},
{blocks: 3, code: accounts.FeeTargetCodeMempoolHour},
{blocks: 2, code: accounts.FeeTargetCodeMempoolHalfHour},
{blocks: 1, code: accounts.FeeTargetCodeMempoolFastest},
Expand All @@ -81,22 +79,20 @@ func TestFeeTargets(t *testing.T) {

// non-empty slice, with some nil feeRates
feeTargetsSlice := []*FeeTarget{
{blocks: 12, code: accounts.FeeTargetCodeMempoolEconomy},
{blocks: 3, code: accounts.FeeTargetCodeMempoolHour, feeRatePerKb: amt(12)},
{blocks: 2, code: accounts.FeeTargetCodeMempoolHalfHour},
{blocks: 1, code: accounts.FeeTargetCodeMempoolFastest, feeRatePerKb: amt(123)},
}
feeTargets = feeTargetsSlice
require.Equal(t, feeTargetsSlice[3], feeTargets.highest())
require.Equal(t, feeTargetsSlice[2], feeTargets.highest())

// non-empty slice, with unsorted not-nil feeRates
feeTargetsSlice = []*FeeTarget{
{blocks: 3, code: accounts.FeeTargetCodeMempoolHour, feeRatePerKb: amt(12)},
{blocks: 12, code: accounts.FeeTargetCodeMempoolEconomy, feeRatePerKb: amt(1)},
{blocks: 1, code: accounts.FeeTargetCodeMempoolFastest, feeRatePerKb: amt(1234)},
{blocks: 2, code: accounts.FeeTargetCodeMempoolHalfHour, feeRatePerKb: amt(123)},
}
feeTargets = feeTargetsSlice
require.Equal(t, feeTargetsSlice[2], feeTargets.highest())
require.Equal(t, feeTargetsSlice[1], feeTargets.highest())

}
2 changes: 0 additions & 2 deletions frontends/web/src/locales/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,6 @@
"low": "2 hours (12 blocks)",
"low_eth": "5 minutes or less",
"low_ltc": "30 minutes (12 blocks)",
"mEconomy": "-",
"mFastest": "10 minutes (next block)",
"mHalfHour": "20 minutes (2 blocks)",
"mHour": "30 minutes (3 blocks)",
Expand All @@ -1651,7 +1650,6 @@
"economy": "Economy",
"high": "High",
"low": "Low",
"mEconomy": "No priority",
"mFastest": "High",
"mHalfHour": "Medium",
"mHour": "Low",
Expand Down

0 comments on commit bd876f6

Please sign in to comment.