Compare commits

...

2 Commits

Author SHA1 Message Date
Denis Angell
01fb1c28d4 contributing + explorer 2022-09-22 16:40:32 -04:00
Denis Angell
ac85c5de6f paychan create it + contributing 2022-09-22 16:39:33 -04:00
5 changed files with 1970 additions and 5 deletions

View File

@@ -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

File diff suppressed because it is too large Load Diff

View File

@@ -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'",

View File

@@ -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.

View File

@@ -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)
})
})