mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
rename IC to Token
This commit is contained in:
@@ -9,7 +9,7 @@ export async function teardownClient(this: Mocha.Context): Promise<void> {
|
||||
}
|
||||
|
||||
// eslint-disable-next-line max-params -- need comments
|
||||
async function initIC(
|
||||
async function initToken(
|
||||
client: Client,
|
||||
wallet: Wallet,
|
||||
destination: Wallet,
|
||||
@@ -111,7 +111,7 @@ async function initIC(
|
||||
export async function setupClient(
|
||||
this: Mocha.Context,
|
||||
server = serverUrl,
|
||||
ic?: boolean | false,
|
||||
token?: boolean | false,
|
||||
): Promise<void> {
|
||||
this.wallet = Wallet.generate()
|
||||
this.destination = Wallet.generate()
|
||||
@@ -124,8 +124,13 @@ export async function setupClient(
|
||||
await fundAccount(this.client, this.wallet)
|
||||
await fundAccount(this.client, this.destination)
|
||||
await fundAccount(this.client, this.gateway)
|
||||
if (ic) {
|
||||
await initIC(this.client, this.wallet, this.destination, this.gateway)
|
||||
if (token) {
|
||||
await initToken(
|
||||
this.client,
|
||||
this.wallet,
|
||||
this.destination,
|
||||
this.gateway,
|
||||
)
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
|
||||
@@ -12,10 +12,10 @@ const TIMEOUT = 20000
|
||||
describe('EscrowCreate', function () {
|
||||
this.timeout(TIMEOUT)
|
||||
|
||||
beforeEach(_.partial(setupClient, serverUrl))
|
||||
beforeEach(_.partial(setupClient, serverUrl, true))
|
||||
afterEach(teardownClient)
|
||||
|
||||
it('native', async function () {
|
||||
it('xrp test', async function () {
|
||||
// get the most recent close_time from the standalone container for finish after.
|
||||
const CLOSE_TIME: number = (
|
||||
await this.client.request({
|
||||
@@ -47,7 +47,7 @@ describe('EscrowCreate', function () {
|
||||
)
|
||||
})
|
||||
|
||||
it('ic', async function () {
|
||||
it('token test', async function () {
|
||||
// get the most recent close_time from the standalone container for finish after.
|
||||
const CLOSE_TIME: number = (
|
||||
await this.client.request({
|
||||
|
||||
@@ -15,7 +15,7 @@ describe('PaymentChannelClaim', function () {
|
||||
beforeEach(_.partial(setupClient, serverUrl, true))
|
||||
afterEach(teardownClient)
|
||||
|
||||
it('native', async function () {
|
||||
it('xrp test', async function () {
|
||||
const wallet2 = await generateFundedWallet(this.client)
|
||||
const paymentChannelCreate: PaymentChannelCreate = {
|
||||
TransactionType: 'PaymentChannelCreate',
|
||||
@@ -47,7 +47,7 @@ describe('PaymentChannelClaim', function () {
|
||||
await testTransaction(this.client, paymentChannelClaim, this.wallet)
|
||||
})
|
||||
|
||||
it('ic', async function () {
|
||||
it('token test', async function () {
|
||||
const paymentChannelCreate: PaymentChannelCreate = {
|
||||
TransactionType: 'PaymentChannelCreate',
|
||||
Account: this.wallet.classicAddress,
|
||||
|
||||
@@ -14,7 +14,7 @@ describe('PaymentChannelCreate', function () {
|
||||
beforeEach(_.partial(setupClient, serverUrl, true))
|
||||
afterEach(teardownClient)
|
||||
|
||||
it('native', async function () {
|
||||
it('xrp test', async function () {
|
||||
const wallet2 = await generateFundedWallet(this.client)
|
||||
const paymentChannelCreate: PaymentChannelCreate = {
|
||||
TransactionType: 'PaymentChannelCreate',
|
||||
@@ -27,7 +27,7 @@ describe('PaymentChannelCreate', function () {
|
||||
|
||||
await testTransaction(this.client, paymentChannelCreate, this.wallet)
|
||||
})
|
||||
it('ic', async function () {
|
||||
it('token test', async function () {
|
||||
const paymentChannelCreate: PaymentChannelCreate = {
|
||||
TransactionType: 'PaymentChannelCreate',
|
||||
Account: this.wallet.classicAddress,
|
||||
|
||||
@@ -15,7 +15,7 @@ describe('PaymentChannelFund', function () {
|
||||
beforeEach(_.partial(setupClient, serverUrl, true))
|
||||
afterEach(teardownClient)
|
||||
|
||||
it('native', async function () {
|
||||
it('xrp test', async function () {
|
||||
const wallet2 = await generateFundedWallet(this.client)
|
||||
const paymentChannelCreate: PaymentChannelCreate = {
|
||||
TransactionType: 'PaymentChannelCreate',
|
||||
@@ -45,7 +45,7 @@ describe('PaymentChannelFund', function () {
|
||||
|
||||
await testTransaction(this.client, paymentChannelFund, this.wallet)
|
||||
})
|
||||
it('ic', async function () {
|
||||
it('token test', async function () {
|
||||
const paymentChannelCreate: PaymentChannelCreate = {
|
||||
TransactionType: 'PaymentChannelCreate',
|
||||
Account: this.wallet.classicAddress,
|
||||
|
||||
Reference in New Issue
Block a user