Skip to content

Commit

Permalink
Merge branch 'feat/coupon' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
sjatsh committed Nov 14, 2023
2 parents f1d7e9b + 000b49c commit 8dcafa6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions http_svr/handle/order_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package handle

import (
"fmt"
"github.com/dotbitHQ/das-lib/common"
"github.com/dotbitHQ/das-lib/core"
"github.com/dotbitHQ/das-lib/http_api"
"github.com/gin-gonic/gin"
Expand Down Expand Up @@ -98,8 +99,10 @@ func (h *HttpHandle) doOrderCreate(req *ReqOrderCreate, apiResp *http_api.ApiRes

var paymentInfo tables.TablePaymentInfo
if orderInfo.Amount.LessThanOrEqual(decimal.Zero) {
payHash := common.Bytes2Hex(common.Blake2b([]byte(orderInfo.OrderId)))
paymentInfo = tables.TablePaymentInfo{
OrderId: orderInfo.OrderId,
PayHash: payHash,
PayAddress: addrHex.AddressHex,
AlgorithmId: addrHex.DasAlgorithmId,
Timestamp: time.Now().UnixMilli(),
Expand Down

0 comments on commit 8dcafa6

Please sign in to comment.