update xrpl to 4.0.0

This commit is contained in:
nitowa
2024-10-11 16:34:15 +02:00
parent 335bff7094
commit 94a006496a
5 changed files with 457 additions and 288 deletions
+13 -16
View File
@@ -1,3 +1,4 @@
import axios from 'axios';
import { Wallet } from "../src/util/types";
import { readFileSync } from 'fs'
const Path = require('path')
@@ -7,22 +8,18 @@ export const TEST_CONFIG = {
}
export const TEST_DATA = "test123123"
import fetch from 'node-fetch';
export const makeTestnetWallet = () : Promise<Wallet> => fetch('https://faucet.altnet.rippletest.net/accounts', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
}).then((raw:any) => {
return raw.json().then(content => {
return({
secret: content.account.secret,
address: content.account.address
});
})
});
export const makeTestnetWallet = async () : Promise<Wallet> => {
try{
const response = await axios.post('https://faucet.altnet.rippletest.net/accounts', {})
return ({
secret: response.data.seed,
address: response.data.account.address
})
}catch(e){
console.log(e)
}
}
export const htmlTxt = readFileSync(Path.resolve(__dirname, '..', '..', 'test', 'index.html')).toString('ascii')
+1 -1
View File
@@ -155,7 +155,7 @@ describe('XRPIO', () => {
})
it('sends even if rate limit exceeded', async function(){
this.timeout(10 * 60 * 1000) //10m
this.timeout(100 * 60 * 1000) //100m
console.log("Testing if sending past rate limits correctly recovers and finishes. This may take a while.")
await api.treeWrite(htmlTxt, receiveWallet.address, sendWallet.secret)
console.log("1/7")