File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/server/routes/backend-wallet Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { Static , Type } from "@sinclair/typebox" ;
2
- import { constants } from "ethers" ;
3
2
import { FastifyInstance } from "fastify" ;
4
3
import { StatusCodes } from "http-status-codes" ;
5
4
import {
@@ -38,12 +37,12 @@ const requestBodySchema = Type.Object({
38
37
...AddressSchema ,
39
38
description : "The recipient wallet address." ,
40
39
} ,
41
- currencyAddress : {
40
+ currencyAddress : Type . Optional ( {
42
41
...AddressSchema ,
43
42
examples : [ constants . AddressZero ] ,
44
43
description :
45
44
"The token address to transfer. Omit to transfer the chain's native currency (e.g. ETH on Ethereum)." ,
46
- } ,
45
+ } ) ,
47
46
amount : Type . String ( {
48
47
description :
49
48
'The amount in ether to transfer. Example: "0.1" to send 0.1 ETH.' ,
@@ -80,7 +79,7 @@ export async function transfer(fastify: FastifyInstance) {
80
79
const {
81
80
to,
82
81
amount,
83
- currencyAddress : _currencyAddress ,
82
+ currencyAddress : _currencyAddress = ZERO_ADDRESS ,
84
83
txOverrides,
85
84
} = request . body ;
86
85
const {
You can’t perform that action at this time.
0 commit comments