Skip to content

Commit

Permalink
Fix ChargeOutput struct
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Sep 6, 2023
1 parent 88b1c17 commit a06125a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ jobs:
go-version: ['1.21.x']
services:
keydb:
image: eqalpha/keydb:latest
image: redis
ports:
- 6379:6379
options: --server-threads 1 --health-cmd "redis-cli ping " --health-interval 5s --health-retries 10
volumes:
- ${{ github.workspace }}:/workspace
steps:
- name: Install Go
uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion src/api/checkout.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (a *Checkout) GetConfig(ctx *gear.Context) error {
}

func (a *Checkout) Get(ctx *gear.Context) error {
input := &bll.QueryIdCn{}
input := &bll.QueryId{}
if err := ctx.ParseURL(input); err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions src/bll/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ type Payload struct {
Amount int64 `json:"amount" cbor:"amount"`
}

type QueryIdCn struct {
type QueryId struct {
ID util.ID `json:"id,omitempty" cbor:"id,omitempty" query:"id"`
Fields *string `json:"fields,omitempty" cbor:"fields,omitempty" query:"fields"`
}

func (i *QueryIdCn) Validate() error {
func (i *QueryId) Validate() error {
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion src/bll/walletbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ type ChargeOutput struct {
ExpireAt *int64 `json:"expire_at,omitempty" cbor:"expire_at,omitempty"`
Currency *string `json:"currency,omitempty" cbor:"currency,omitempty"`
Amount *uint `json:"amount,omitempty" cbor:"amount,omitempty"`
AmountRefunded *string `json:"amount_refunded,omitempty" cbor:"amount_refunded,omitempty"`
AmountRefunded *uint `json:"amount_refunded,omitempty" cbor:"amount_refunded,omitempty"`
ChargeID *string `json:"charge_id,omitempty" cbor:"charge_id,omitempty"`
ChargePayload *util.Bytes `json:"charge_payload,omitempty" cbor:"charge_payload,omitempty"`
Txn *util.ID `json:"txn,omitempty" cbor:"txn,omitempty"`
Expand Down

0 comments on commit a06125a

Please sign in to comment.