Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cranktakular committed Jul 2, 2024
1 parent b8d2295 commit 36145f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions exchanges/bitget/bitget.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,9 @@ func (bi *Bitget) GetP2PTransactionRecords(ctx context.Context, currency string,
}

// GetP2PMerchantList returns detailed information on merchants
func (bi *Bitget) GetP2PMerchantList(ctx context.Context, online, merchantID string, limit, pagination int64) (*P2PMerListResp, error) {
func (bi *Bitget) GetP2PMerchantList(ctx context.Context, online string, limit, pagination int64) (*P2PMerListResp, error) {
vals := url.Values{}
vals.Set("online", online)
vals.Set("merchantId", merchantID)
if limit != 0 {
vals.Set("limit", strconv.FormatInt(limit, 10))
}
Expand Down
6 changes: 3 additions & 3 deletions exchanges/bitget/bitget_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func TestGetP2PTransactionRecords(t *testing.T) {
func TestGetP2PMerchantList(t *testing.T) {
t.Parallel()
sharedtestvalues.SkipTestIfCredentialsUnset(t, bi)
_, err := bi.GetP2PMerchantList(context.Background(), "", "", 5, 1<<62)
_, err := bi.GetP2PMerchantList(context.Background(), "", 5, 1<<62)
assert.NoError(t, err)
}

Expand Down Expand Up @@ -2412,7 +2412,7 @@ func TestCommitConversion(t *testing.T) {
}

func TestCommitConversionAbomination(t *testing.T) {
testGenAbomination(t, bi.CommitConversion, 3, canManipulateRealOrders, []genAbominationStruct[string, string,
testGenAbomination(t, bi.CommitConversion, 4, canManipulateRealOrders, []genAbominationStruct[string, string,
string, float64, float64, float64]{{"", "", "", 0, 0, 0, errCurrencyEmpty}, {testCrypto.String(),
testFiat.String(), "", 0, 0, 0, errTraceIDEmpty}, {testCrypto.String(), testFiat.String(), "1", 0, 0, 0,
errAmountEmpty}, {testCrypto.String(), testFiat.String(), "1", 1, 1, 0, errPriceEmpty}})
Expand Down Expand Up @@ -2634,7 +2634,7 @@ func testGenAbomination[R genAbominationResp, P1, P2, P3, P4, P5, P6 getOneArgPa
} else {
assert.NoError(t, err)
}
if i == checkCredsAfter {
if i == checkCredsAfter-1 {
sharedtestvalues.SkipTestIfCredentialsUnset(t, bi, canManipOrders)
}
}
Expand Down

0 comments on commit 36145f9

Please sign in to comment.