mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
Merge branch 'develop' into connection-cleanup-tests
This commit is contained in:
@@ -354,6 +354,16 @@ export default <TestSuite>{
|
||||
)
|
||||
},
|
||||
|
||||
'AccountDelete': async (api, address) => {
|
||||
const hash = 'EC2AB14028DC84DE525470AB4DAAA46358B50A8662C63804BFF38244731C0CB9'
|
||||
const response = await api.getTransaction(hash)
|
||||
assertResultMatch(
|
||||
response,
|
||||
RESPONSE_FIXTURES.accountDelete,
|
||||
'getTransaction'
|
||||
)
|
||||
},
|
||||
|
||||
'no Meta': async (api, address) => {
|
||||
const hash =
|
||||
'AFB3ADF22F3C605E23FAEFAA185F3BD763C4692CAC490D9819D117CD33BFAA1B'
|
||||
|
||||
@@ -745,6 +745,33 @@ export default <TestSuite>{
|
||||
return assertResultMatch(response, expected, 'prepare')
|
||||
},
|
||||
|
||||
'AccountDelete': async (api, address) => {
|
||||
const localInstructions = {
|
||||
...instructionsWithMaxLedgerVersionOffset,
|
||||
maxFee: '5.0' // 5 XRP fee for AccountDelete
|
||||
}
|
||||
|
||||
const txJSON = {
|
||||
TransactionType: 'AccountDelete',
|
||||
Account: address,
|
||||
Destination: 'rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe'
|
||||
}
|
||||
|
||||
const response = await api.prepareTransaction(txJSON, localInstructions)
|
||||
const expected = {
|
||||
txJSON:
|
||||
'{"TransactionType":"AccountDelete","Account":"' +
|
||||
address +
|
||||
'","Destination":"rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe","Flags":2147483648,"LastLedgerSequence":8820051,"Fee":"12","Sequence":23}',
|
||||
instructions: {
|
||||
fee: '0.000012',
|
||||
sequence: 23,
|
||||
maxLedgerVersion: 8820051
|
||||
}
|
||||
}
|
||||
return assertResultMatch(response, expected, 'prepare')
|
||||
},
|
||||
|
||||
// prepareTransaction - Payment
|
||||
'Payment - normal': async (api, address) => {
|
||||
const localInstructions = {
|
||||
|
||||
@@ -212,7 +212,7 @@ export default <TestSuite>{
|
||||
) => {
|
||||
const secret = 'shsWGZcmZz6YsWWmcnpfr6fLTdtFV'
|
||||
const request = {
|
||||
// TODO: This fails when address is X-Address
|
||||
// TODO: This fails when address is X-address
|
||||
txJSON: `{"Flags":2147483648,"TransactionType":"AccountSet","Account":"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59","Domain":"726970706C652E636F6D","LastLedgerSequence":8820051,"Fee":"1.2","Sequence":23,"SigningPubKey":"02F89EAEC7667B30F33D0687BBA86C3FE2A08CCA40A9186C5BDE2DAA6FA97A37D8"}`,
|
||||
instructions: {
|
||||
fee: '0.0000012',
|
||||
@@ -232,7 +232,7 @@ export default <TestSuite>{
|
||||
) => {
|
||||
const secret = 'shsWGZcmZz6YsWWmcnpfr6fLTdtFV'
|
||||
const request = {
|
||||
// TODO: This fails when address is X-Address
|
||||
// TODO: This fails when address is X-address
|
||||
txJSON: `{"Flags":2147483648,"TransactionType":"AccountSet","Account":"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59","Domain":"726970706C652E636F6D","LastLedgerSequence":8820051,"Fee":"1123456.7","Sequence":23,"SigningPubKey":"02F89EAEC7667B30F33D0687BBA86C3FE2A08CCA40A9186C5BDE2DAA6FA97A37D8"}`,
|
||||
instructions: {
|
||||
fee: '1.1234567',
|
||||
@@ -289,7 +289,7 @@ export default <TestSuite>{
|
||||
api._maxFeeXRP = '2.1'
|
||||
const secret = 'shsWGZcmZz6YsWWmcnpfr6fLTdtFV'
|
||||
const request = {
|
||||
// TODO: This fails when address is X-Address
|
||||
// TODO: This fails when address is X-address
|
||||
txJSON: `{"Flags":2147483648,"TransactionType":"AccountSet","Account":"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59","Domain":"726970706C652E636F6D","LastLedgerSequence":8820051,"Fee":"2010000","Sequence":23,"SigningPubKey":"02F89EAEC7667B30F33D0687BBA86C3FE2A08CCA40A9186C5BDE2DAA6FA97A37D8"}`,
|
||||
instructions: {
|
||||
fee: '2.01',
|
||||
|
||||
Reference in New Issue
Block a user