File tree Expand file tree Collapse file tree 5 files changed +7
-2
lines changed
packages/wallet/backend/src Expand file tree Collapse file tree 5 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ services:
73
73
CARD_PIN_HREF : ${CARD_PIN_HREF}
74
74
STRIPE_SECRET_KEY : ${STRIPE_SECRET_KEY}
75
75
STRIPE_WEBHOOK_SECRET : ${STRIPE_WEBHOOK_SECRET}
76
+ USE_STRIPE : ${USE_STRIPE}
76
77
restart : always
77
78
networks :
78
79
- testnet
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ services:
77
77
GATEHUB_CARD_PP_PREFIX : ${WALLET_BACKEND_GATEHUB_CARD_PP_PREFIX}
78
78
STRIPE_SECRET_KEY : ${WALLET_BACKEND_STRIPE_SECRET_KEY}
79
79
STRIPE_WEBHOOK_SECRET : ${WALLET_BACKEND_STRIPE_WEBHOOK_SECRET}
80
+ USE_STRIPE : ${USE_STRIPE}
80
81
networks :
81
82
- testnet
82
83
ports :
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const envSchema = z.object({
51
51
CARD_PIN_HREF : z . string ( ) . default ( 'UPDATEME' ) ,
52
52
STRIPE_SECRET_KEY : z . string ( ) . default ( 'STRIPE_SECRET_KEY' ) ,
53
53
STRIPE_WEBHOOK_SECRET : z . string ( ) . default ( 'STRIPE_WEBHOOK_SECRET' ) ,
54
- USE_STRIPE : z . boolean ( ) . default ( false )
54
+ USE_STRIPE : z . coerce . boolean ( ) . default ( false )
55
55
} )
56
56
57
57
export type Env = z . infer < typeof envSchema >
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ export class StripeController implements IStripeController {
46
46
throw new BadRequest ( 'Invalid stripe webhook signature' )
47
47
}
48
48
49
+ const parsedBody = JSON . parse ( req . body . toString ( ) )
50
+ req . body = parsedBody
51
+
49
52
const wh = await validate ( webhookBodySchema , req )
50
53
await this . stripeService . onWebHook ( wh . body )
51
54
res . status ( 200 ) . send ( )
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export class StripeService implements IStripeService {
48
48
try {
49
49
await this . gateHubClient . createTransaction ( {
50
50
amount,
51
- vault_uuid : this . gateHubClient . getVaultUuid ( currency ) ,
51
+ vault_uuid : this . gateHubClient . getVaultUuid ( currency . toUpperCase ( ) ) ,
52
52
receiving_address,
53
53
sending_address : this . env . GATEHUB_SETTLEMENT_WALLET_ADDRESS ,
54
54
type : TransactionTypeEnum . HOSTED ,
You can’t perform that action at this time.
0 commit comments