Skip to content

Commit

Permalink
chore: small update for body request
Browse files Browse the repository at this point in the history
  • Loading branch information
HoangVD2 committed May 24, 2024
1 parent be0b435 commit 59dc7ff
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions gas-tank/balance-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ await fetch(`${GAS_TANK_ENDPOINT}/balances/increase`, {
"Content-Type": "application/json"
"Authorization": `Bearer ${jwtToken}`, // JWT token // [!code highlight]
},
body: {
body: JSON.stringify({
address: address, // [!code highlight]
tokenAddress: "string", // [!code highlight]
chain: "string", // [!code highlight]
Expand All @@ -156,7 +156,7 @@ await fetch(`${GAS_TANK_ENDPOINT}/balances/increase`, {
v: v, // [!code highlight]
r: r, // [!code highlight]
s: s // [!code highlight]
},
}),
})
.then((response) => {
// Balance deposit successfully
Expand Down Expand Up @@ -195,15 +195,15 @@ await fetch(`${GAS_TANK_ENDPOINT}/balances/withdraw`, {
"Content-Type": "application/json"
"Authorization": `Bearer ${jwtToken}`, // JWT token // [!code highlight]
},
body: {
body: JSON.stringify({
address: address, // [!code highlight]
tokenAddress: "string", // [!code highlight]
amount: "string", // [!code highlight]
chain: "string", // [!code highlight]
recipient: "string", // [!code highlight]
message: message, // [!code highlight]
signature: signature // [!code highlight]
},
}),
})
.then((response) => {
// Balance withdrawn successfully
Expand Down Expand Up @@ -238,15 +238,15 @@ await fetch(`${GAS_TANK_ENDPOINT}/balances/transfer`, {
"Content-Type": "application/json",
Authorization: `Bearer ${jwtToken}`, // JWT token // [!code highlight]
},
body: {
body: JSON.stringify({
address: address, // [!code highlight]
tokenAddress: "string", // [!code highlight]
amount: "string", // [!code highlight]
chain: "string", // [!code highlight]
recipient: "string", // [!code highlight]
message: message, // [!code highlight]
signature: signature, // [!code highlight]
},
}),
})
.then((response) => {
// Internal transfer task created successfully
Expand Down Expand Up @@ -285,14 +285,14 @@ await fetch(`${GAS_TANK_ENDPOINT}/balances/consume`, {
"Content-Type": "application/json",
Authorization: `Bearer ${jwtToken}`, // JWT token // [!code highlight]
},
body: {
body: JSON.stringify({
address: address, // [!code highlight]
minDestinationAmount: "string", // [!code highlight]
destinationAddress: "string", // [!code highlight]
destinationChain: "string", // [!code highlight]
message: message, // [!code highlight]
signature: signature, // [!code highlight]
},
}),
})
.then((response) => {
// Balance consumed successfully
Expand All @@ -319,11 +319,11 @@ await fetch(`${GAS_TANK_ENDPOINT}/balances/consume/quote`, {
"Content-Type": "application/json",
Authorization: `Bearer ${jwtToken}`, // JWT token // [!code highlight]
},
body: {
body: JSON.stringify({
address: "string", // [!code highlight]
minDestinationAmount: "string", // [!code highlight]
destinationChain: "string", // [!code highlight]
},
}),
})
.then((response) => {
console.log(response);
Expand Down

0 comments on commit 59dc7ff

Please sign in to comment.