mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-05 05:15:48 +00:00
Compare commits
2 Commits
@transia/r
...
denis-icv2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01fb1c28d4 | ||
|
|
ac85c5de6f |
@@ -53,7 +53,14 @@ npm test
|
||||
```bash
|
||||
npm install
|
||||
# sets up the rippled standalone Docker container - you can skip this step if you already have it set up
|
||||
docker run -p 6006:6006 -it natenichols/rippled-standalone:latest
|
||||
docker run -p 6006:6006 -it gcr.io/metaxrplorer/icv2:latest
|
||||
|
||||
# If you want to run rippled w/ explorer run the following
|
||||
# Run rippled in standalone
|
||||
docker run -p 6006:6006 -p 80:80 -it gcr.io/metaxrplorer/icv2:latest
|
||||
# In another shell run the explorer
|
||||
docker run -e VUE_APP_WSS_ENDPOINT=ws://0.0.0.0:80 -p 3000:3000 -it gcr.io/metaxrplorer/explorer:latest
|
||||
|
||||
npm run build
|
||||
npm run test:integration
|
||||
```
|
||||
@@ -69,7 +76,7 @@ The other is in the command line (this is what we use for CI) -
|
||||
```bash
|
||||
npm run build
|
||||
# sets up the rippled standalone Docker container - you can skip this step if you already have it set up
|
||||
docker run -p 6006:6006 -it natenichols/rippled-standalone:latest
|
||||
docker run -p 6006:6006 -it gcr.io/metaxrplorer/icv2:latest
|
||||
npm run test:browser
|
||||
```
|
||||
|
||||
|
||||
1938
package-lock.json
generated
1938
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,7 @@
|
||||
"docgen": "typedoc && echo js.xrpl.org >> ../../docs/CNAME",
|
||||
"prepublish": "run-s clean build",
|
||||
"test": "nyc mocha --config=test/.mocharc.json --exit",
|
||||
"test:integration": "TS_NODE_PROJECT=tsconfig.build.json nyc mocha ./test/integration/**/*.ts ./test/integration/*.ts",
|
||||
"test:integration": "TS_NODE_PROJECT=tsconfig.build.json nyc mocha ./test/integration/transactions/paymentChannelCreate.ts",
|
||||
"test:browser": "npm run build:browserTests && TS_NODE_PROJECT=tsconfig.build.json nyc mocha ./test/browser/*.ts",
|
||||
"test:watch": "TS_NODE_PROJECT=src/tsconfig.json mocha --config=test/.mocharc.json --watch --reporter dot",
|
||||
"format": "prettier --write '{src,test}/**/*.ts'",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* eslint-disable complexity -- Necessary for validatePaymentChannelCreate */
|
||||
import { ValidationError } from '../../errors'
|
||||
import { Amount } from '../common'
|
||||
|
||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
|
||||
@@ -17,7 +18,7 @@ export interface PaymentChannelCreate extends BaseTransaction {
|
||||
* Destination address. When the channel closes, any unclaimed XRP is returned
|
||||
* to the source address's balance.
|
||||
*/
|
||||
Amount: string
|
||||
Amount: Amount
|
||||
/**
|
||||
* Address to receive XRP claims against this channel. This is also known as
|
||||
* the "destination address" for the channel.
|
||||
|
||||
@@ -27,4 +27,25 @@ describe('PaymentChannelCreate', function () {
|
||||
|
||||
await testTransaction(this.client, paymentChannelCreate, this.wallet)
|
||||
})
|
||||
|
||||
it('base ic', async function () {
|
||||
const wallet2 = await generateFundedWallet(this.client)
|
||||
const wallet3 = await generateFundedWallet(this.client)
|
||||
console.log(wallet2);
|
||||
|
||||
const paymentChannelCreate: PaymentChannelCreate = {
|
||||
TransactionType: 'PaymentChannelCreate',
|
||||
Account: this.wallet.classicAddress,
|
||||
Amount: {
|
||||
currency: 'USD',
|
||||
issuer: wallet3.classicAddress,
|
||||
value: '10',
|
||||
},
|
||||
Destination: wallet2.classicAddress,
|
||||
SettleDelay: 86400,
|
||||
PublicKey: this.wallet.publicKey,
|
||||
}
|
||||
|
||||
await testTransaction(this.client, paymentChannelCreate, this.wallet)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user