mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-04 13:05:49 +00:00
fix: convert uint8Array to Buffer (#1679)
This commit is contained in:
committed by
Mayukha Vadari
parent
a1dce6b1e0
commit
578f35dd35
@@ -48,10 +48,12 @@ async function generateFaucetWallet(
|
||||
: Wallet.generate()
|
||||
|
||||
// Create the POST request body
|
||||
const postBody = new TextEncoder().encode(
|
||||
JSON.stringify({
|
||||
destination: fundWallet.classicAddress,
|
||||
}),
|
||||
const postBody = Buffer.from(
|
||||
new TextEncoder().encode(
|
||||
JSON.stringify({
|
||||
destination: fundWallet.classicAddress,
|
||||
}),
|
||||
),
|
||||
)
|
||||
|
||||
let startingBalance = 0
|
||||
@@ -75,7 +77,7 @@ async function returnPromise(
|
||||
client: Client,
|
||||
startingBalance: number,
|
||||
fundWallet: Wallet,
|
||||
postBody: Uint8Array,
|
||||
postBody: Buffer,
|
||||
): Promise<Wallet> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const request = httpsRequest(options, (response) => {
|
||||
|
||||
Reference in New Issue
Block a user