restucturization of recipients payment methods
All checks were successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
All checks were successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
|
||||
// Fake implements Client for tests.
|
||||
type Fake struct {
|
||||
CreateAccountFn func(ctx context.Context, req *ledgerv1.CreateAccountRequest) (*ledgerv1.CreateAccountResponse, error)
|
||||
ListAccountsFn func(ctx context.Context, req *ledgerv1.ListAccountsRequest) (*ledgerv1.ListAccountsResponse, error)
|
||||
PostCreditWithChargesFn func(ctx context.Context, req *ledgerv1.PostCreditRequest) (*ledgerv1.PostResponse, error)
|
||||
PostDebitWithChargesFn func(ctx context.Context, req *ledgerv1.PostDebitRequest) (*ledgerv1.PostResponse, error)
|
||||
TransferInternalFn func(ctx context.Context, req *ledgerv1.TransferRequest) (*ledgerv1.PostResponse, error)
|
||||
@@ -18,6 +20,20 @@ type Fake struct {
|
||||
CloseFn func() error
|
||||
}
|
||||
|
||||
func (f *Fake) CreateAccount(ctx context.Context, req *ledgerv1.CreateAccountRequest) (*ledgerv1.CreateAccountResponse, error) {
|
||||
if f.CreateAccountFn != nil {
|
||||
return f.CreateAccountFn(ctx, req)
|
||||
}
|
||||
return &ledgerv1.CreateAccountResponse{}, nil
|
||||
}
|
||||
|
||||
func (f *Fake) ListAccounts(ctx context.Context, req *ledgerv1.ListAccountsRequest) (*ledgerv1.ListAccountsResponse, error) {
|
||||
if f.ListAccountsFn != nil {
|
||||
return f.ListAccountsFn(ctx, req)
|
||||
}
|
||||
return &ledgerv1.ListAccountsResponse{}, nil
|
||||
}
|
||||
|
||||
func (f *Fake) PostCreditWithCharges(ctx context.Context, req *ledgerv1.PostCreditRequest) (*ledgerv1.PostResponse, error) {
|
||||
if f.PostCreditWithChargesFn != nil {
|
||||
return f.PostCreditWithChargesFn(ctx, req)
|
||||
|
||||
@@ -249,7 +249,7 @@ func (s *Service) getStatementResponder(_ context.Context, req *ledgerv1.GetStat
|
||||
func parseCursor(cursor string) (int, error) {
|
||||
decoded, err := base64.StdEncoding.DecodeString(cursor)
|
||||
if err != nil {
|
||||
return 0, merrors.InvalidArgumentWrap(err, "invalid cursor base64 encoding")
|
||||
return 0, merrors.InvalidArgumentWrap(err, "invalid base64")
|
||||
}
|
||||
parts := strings.Split(string(decoded), ":")
|
||||
if len(parts) != 2 || parts[0] != "offset" {
|
||||
@@ -257,7 +257,7 @@ func parseCursor(cursor string) (int, error) {
|
||||
}
|
||||
offset, err := strconv.Atoi(parts[1])
|
||||
if err != nil {
|
||||
return 0, merrors.InvalidArgumentWrap(err, "invalid cursor offset")
|
||||
return 0, merrors.InvalidArgumentWrap(err, "invalid offset")
|
||||
}
|
||||
return offset, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user