Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIVE-8174] Feature - coin-xrp module #6822

Merged
merged 4 commits into from
May 15, 2024
Merged

Conversation

lambertkevin
Copy link
Contributor

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • should have no impact on features
    • XRP send flow can be impacted in case of bugs

πŸ“ Description

Creation of the coin-xrp module, with support for better spendable balance (monitoring base reserve & trustlines), better typing, signer injection & removal of unmaintained libs like ripple-bs58check

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@lambertkevin lambertkevin requested review from a team as code owners May 7, 2024 23:48
Copy link

vercel bot commented May 7, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Visit Preview May 14, 2024 5:10pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview May 14, 2024 5:10pm
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview May 14, 2024 5:10pm
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview May 14, 2024 5:10pm
web-tools ⬜️ Ignored (Inspect) Visit Preview May 14, 2024 5:10pm

@live-github-bot live-github-bot bot added common Has changes in live-common ledgerjs Has changes in the ledgerjs open source libs labels May 7, 2024
Copy link

socket-security bot commented May 7, 2024

New and removed dependencies detected. Learn more about Socket for GitHub β†—οΈŽ

Package New capabilities Transitives Size Publisher
npm/@ledgerhq/coin-xrp@0.1.0 None 0 0 B
npm/@types/invariant@2.2.37 None 0 3.55 kB types
npm/ripple-address-codec@5.0.0 Transitive: environment, network +5 1.18 MB ckniffen
npm/typescript@5.4.5 None 0 32.4 MB typescript-bot

View full reportβ†—οΈŽ

@lambertkevin lambertkevin force-pushed the feature/coin-xrp branch 3 times, most recently from 463b5e4 to 08b0b9e Compare May 8, 2024 18:05
@live-github-bot
Copy link
Contributor

live-github-bot bot commented May 8, 2024

Desktop Bundle Checks

Comparing 9ddfbe1 against 679bf73.

⚠️ @scure/base library is now duplicated in renderer (regression)
⚠️ ripple-address-codec library is now duplicated in renderer (regression)

Mobile Bundle Checks

Comparing 9ddfbe1 against 679bf73.

βœ… Previous issues have all been fixed.

@live-github-bot live-github-bot bot added desktop Has changes in LLD mobile Has changes in LLM labels May 9, 2024
@lambertkevin lambertkevin force-pushed the feature/coin-xrp branch 3 times, most recently from b069291 to 90e3c97 Compare May 9, 2024 21:23
@LedgerHQ LedgerHQ deleted a comment from github-actions bot May 9, 2024
@LedgerHQ LedgerHQ deleted a comment from github-actions bot May 9, 2024
@LedgerHQ LedgerHQ deleted a comment from github-actions bot May 9, 2024
@LedgerHQ LedgerHQ deleted a comment from github-actions bot May 9, 2024
@lambertkevin lambertkevin force-pushed the feature/coin-xrp branch 4 times, most recently from b64e69e to 67cd3d1 Compare May 9, 2024 21:56
Copy link

github-actions bot commented May 9, 2024

[Bot] Testing with 'Nitrogen' βœ… 1 txs ❌ 1 txs ($22.82) ⏲ 5min 53s

βœ… 1 specs are successful: XRP
❌ 1 specs have problems: XRP

What is the bot and how does it work? Everything is documented here!

❌ 1 mutation errors
necessary accounts resynced in 0.19ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 11.4166Β XRP (201ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH: (! sum of ops -5.682911Β XRP)
max spendable ~1.41661
β˜… using mutation 'move ~50%'
β†’ TO undefined: 10.0998Β XRP (201ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z:
βœ”οΈ transaction 
SEND 0.697216Β XRP
TO r9etPtq3oboweMPju5gdYufmvwhH2euz8z
with fee=0.00001Β XRP
  tag=123
STATUS (2869ms)
  amount: 0.697216Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 0.697226Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (3.9s) 
βœ”οΈ broadcasted! (209ms) optimistic operation: 
  -0.697216Β XRP      OUT        708907297E2CFBDC952349898735752F22BAE247EDF44DBB8D5C7DB9E4886081 2024-05-09T22:01
βœ”οΈ operation confirmed (11.3s): 
  -0.697226Β XRP      OUT        708907297E2CFBDC952349898735752F22BAE247EDF44DBB8D5C7DB9E4886081 2024-05-09T22:01
βœ”οΈ undefined: 10.7193Β XRP (202ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH: (! sum of ops -6.380137Β XRP)(in 11.3s)
(in 4min 51s)
⚠️ TEST destination > account balance increased with transaction amount
Error: expect(received).toBe(expected) // Object.is equality

Expected: "10797094"
Received: "10797095"
(totally spent 5min 10s – ends at 2024-05-09T22:06:20.234Z)
Details of the 2 mutations

Spec XRP (4)

Spec XRP found 4 XRP accounts. Will use XRP 2.3.2 on nanoS 2.1.0
undefined: 10.2007Β XRP (200ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z:
undefined: 11.3157Β XRP (200ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH:
undefined: 22.4891Β XRP (192ops) (rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn on 44'/144'/2'/0/0) #2 js:2:ripple:rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn:
undefined: 0Β XRP (0ops) (rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC on 44'/144'/3'/0/0) #3 js:2:ripple:rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC:
necessary accounts resynced in 0.19ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 10.2007Β XRP (200ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z: (! sum of ops -13.912837Β XRP)
max spendable ~0.20074
β˜… using mutation 'move ~50%'
β†’ TO undefined: 11.3157Β XRP (200ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH:
βœ”οΈ transaction 
SEND 0.100862Β XRP
TO rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH
with fee=0.00001Β XRP
  tag=123
STATUS (3000ms)
  amount: 0.100862Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 0.100872Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (3.6s) 
βœ”οΈ broadcasted! (133ms) optimistic operation: 
  -0.100862Β XRP      OUT        24FFC9FC26FBE22F24A91DEAECFA0EF60812CA0F340C0910666551CCBABE468B 2024-05-09T22:00
βœ”οΈ operation confirmed (11.2s): 
  -0.100872Β XRP      OUT        24FFC9FC26FBE22F24A91DEAECFA0EF60812CA0F340C0910666551CCBABE468B 2024-05-09T22:00
βœ”οΈ undefined: 10.0998Β XRP (201ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z: (! sum of ops -14.013709Β XRP)(in 11.2s)
βœ”οΈ destination operation 
  +0.100862Β XRP      IN         24FFC9FC26FBE22F24A91DEAECFA0EF60812CA0F340C0910666551CCBABE468B 2024-05-09T22:00
(in 11.3s)

necessary accounts resynced in 0.19ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 11.4166Β XRP (201ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH: (! sum of ops -5.682911Β XRP)
max spendable ~1.41661
β˜… using mutation 'move ~50%'
β†’ TO undefined: 10.0998Β XRP (201ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z:
βœ”οΈ transaction 
SEND 0.697216Β XRP
TO r9etPtq3oboweMPju5gdYufmvwhH2euz8z
with fee=0.00001Β XRP
  tag=123
STATUS (2869ms)
  amount: 0.697216Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 0.697226Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (3.9s) 
βœ”οΈ broadcasted! (209ms) optimistic operation: 
  -0.697216Β XRP      OUT        708907297E2CFBDC952349898735752F22BAE247EDF44DBB8D5C7DB9E4886081 2024-05-09T22:01
βœ”οΈ operation confirmed (11.3s): 
  -0.697226Β XRP      OUT        708907297E2CFBDC952349898735752F22BAE247EDF44DBB8D5C7DB9E4886081 2024-05-09T22:01
βœ”οΈ undefined: 10.7193Β XRP (202ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH: (! sum of ops -6.380137Β XRP)(in 11.3s)
(in 4min 51s)
⚠️ TEST destination > account balance increased with transaction amount
Error: expect(received).toBe(expected) // Object.is equality

Expected: "10797094"
Received: "10797095"
(totally spent 5min 10s – ends at 2024-05-09T22:06:20.240Z)

Portfolio ($22.82) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
XRP (4) 597 ops (+5), 14.0056Β XRP ($22.82) πŸ’ͺ 999+ r9etPtq3oboweMPju5gdYufmvwhH2euz8z
undefined: 10.797Β XRP (203ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z:
undefined: 10.7193Β XRP (202ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH:
undefined: 22.4891Β XRP (192ops) (rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn on 44'/144'/2'/0/0) #2 js:2:ripple:rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn:
undefined: 0Β XRP (0ops) (rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC on 44'/144'/3'/0/0) #3 js:2:ripple:rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC:
Performance ⏲ 5min 53s

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL 0.80ms 5.7s 1055ms 5.9s 7.5s 342ms 22.5s 5min 3s
XRP (3) 0.80ms 5.7s 1055ms 5.9s 7.5s 342ms 22.5s 5min 3s

What is the bot and how does it work? Everything is documented here!

libs/coin-modules/coin-xrp/src/api/index.ts Outdated Show resolved Hide resolved
libs/coin-modules/coin-xrp/src/api/index.ts Outdated Show resolved Hide resolved
libs/coin-modules/coin-xrp/src/api/index.ts Outdated Show resolved Hide resolved
libs/coin-modules/coin-xrp/src/api/types.ts Outdated Show resolved Hide resolved
import { getServerInfos, parseAPIValue } from "./api";
import { NetworkInfo, Transaction } from "./types";

// FIXME this could be cleaner
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment still relevant ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea, the work of this PR was just to modularize the existing code base and adding a few types, we would need to have a proper look at how the coin integration is done to understand what should/could be done better πŸ€·β€β™‚οΈ

networkInfo = {
family: "xrp",
serverFee,
baseReserve: new BigNumber(0), // NOT USED. will refactor later.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we delete this property ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding for now is that the whole networkInfo is useless, but as I don't want to introduce any breaking change for the scope of this PR, I think we should keep it as is, and do some proper cleaning work as a separate PR

libs/ledger-live-common/.unimportedrc.json Outdated Show resolved Hide resolved
@@ -16,6 +16,7 @@ describe("getWalletAPITransactionSignFlowInfos", () => {

const expectedLiveTx: Partial<Transaction> = {
...xrpPlatformTx,
family: "xrp",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should have somewhere in Live common an object

export const defaultXRPTransaction = {
 family: "xrp"
}

And then do

const expectedLiveTx: Partial<Transaction> = {
        ...xrpPlatformTx,
        ...defaultXRPTransaction,
}

That way we can easily extends the default values everywhere its needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think it's necessary for now, as this is just a compatibilty layer while we wait for the wallet-api to stop using the "ripple" family string and rather use the xrp one. As soon as it's done, we can remove that

@@ -1,6 +1,5 @@
import type { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
import Transport from "@ledgerhq/hw-transport";
import ripple from "./ripple";
import tron from "./tron";
// TODO deprecate this approach
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity do we have a better approach in mind already ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh I discovered that file while doing the migration, and I have no idea why it's here and what's the reason to have it. My guess is that it's just a forgotten tech debt of us trying to have a "generated" like file to have a single entrypoint for all "signTransaction", but that's not the idea anymore, so it's most probably useless now and the last coin-integration (tron) using it should be removed as well. But that's not the scope of this PR πŸ‘

@lambertkevin lambertkevin requested a review from a team as a code owner May 13, 2024 11:37
Copy link

[Bot] Testing with 'Nitrogen' βœ… 2 txs ($22.29) ⏲ 71.2s

βœ… 1 specs are successful: XRP

What is the bot and how does it work? Everything is documented here!

Details of the 2 mutations

Spec XRP (4)

Spec XRP found 4 XRP accounts. Will use XRP 2.3.2 on nanoS 2.1.0
undefined: 10.797Β XRP (200ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z:
undefined: 17.0332Β XRP (200ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH:
undefined: 16.1752Β XRP (194ops) (rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn on 44'/144'/2'/0/0) #2 js:2:ripple:rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn:
undefined: 0Β XRP (0ops) (rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC on 44'/144'/3'/0/0) #3 js:2:ripple:rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC:
necessary accounts resynced in 0.28ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 10.797Β XRP (200ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z: (! sum of ops -7.341383Β XRP)
max spendable ~0.797085
β˜… using mutation 'move ~50%'
β†’ TO undefined: 17.0332Β XRP (200ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH:
βœ”οΈ transaction 
SEND 0.388633Β XRP
TO rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH
with fee=0.00001Β XRP
STATUS (2501ms)
  amount: 0.388633Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 0.388643Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (3.7s) 
βœ”οΈ broadcasted! (136ms) optimistic operation: 
  -0.388633Β XRP      OUT        8AEF3FFCFA3C059F0757033CA398EE10855D8AA4D756D49FA7F32DE8F055CB75 2024-05-13T11:58
βœ”οΈ operation confirmed (11.1s): 
  -0.388643Β XRP      OUT        8AEF3FFCFA3C059F0757033CA398EE10855D8AA4D756D49FA7F32DE8F055CB75 2024-05-13T11:58
βœ”οΈ undefined: 10.4084Β XRP (201ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z: (! sum of ops -7.730026Β XRP)(in 11.1s)
βœ”οΈ destination operation 
  +0.388633Β XRP      IN         8AEF3FFCFA3C059F0757033CA398EE10855D8AA4D756D49FA7F32DE8F055CB75 2024-05-13T11:58
(in 11.4s)

necessary accounts resynced in 1.17ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 17.4218Β XRP (201ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH: (! sum of ops 4.180997Β XRP)
max spendable ~7.42185
β˜… using mutation 'move ~50%'
β†’ TO undefined: 16.1752Β XRP (194ops) (rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn on 44'/144'/2'/0/0) #2 js:2:ripple:rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn:
βœ”οΈ transaction 
SEND 3.814718Β XRP
TO rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn
with fee=0.00001Β XRP
  tag=123
STATUS (2809ms)
  amount: 3.814718Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 3.814728Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (4.6s) 
βœ”οΈ broadcasted! (198ms) optimistic operation: 
  -3.814718Β XRP      OUT        D3EF1266AF2B8AA1A668C3DB0F138477B21FCEAFACBC5B627FFA96E1DF5EA8FF 2024-05-13T11:59
βœ”οΈ operation confirmed (11.1s): 
  -3.814728Β XRP      OUT        D3EF1266AF2B8AA1A668C3DB0F138477B21FCEAFACBC5B627FFA96E1DF5EA8FF 2024-05-13T11:59
βœ”οΈ undefined: 13.6071Β XRP (202ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH: (! sum of ops 0.366269Β XRP)(in 11.1s)
βœ”οΈ destination operation 
  +3.814718Β XRP      IN         D3EF1266AF2B8AA1A668C3DB0F138477B21FCEAFACBC5B627FFA96E1DF5EA8FF 2024-05-13T11:59
(in 10.8s)


Portfolio ($22.29) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
XRP (4) 598 ops (+4), 14.0056Β XRP ($22.29) πŸ’ͺ 999+ r9etPtq3oboweMPju5gdYufmvwhH2euz8z
undefined: 10.4084Β XRP (201ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z:
undefined: 13.6071Β XRP (202ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH:
undefined: 19.99Β XRP (195ops) (rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn on 44'/144'/2'/0/0) #2 js:2:ripple:rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn:
undefined: 0Β XRP (0ops) (rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC on 44'/144'/3'/0/0) #3 js:2:ripple:rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC:
Performance ⏲ 71.2s

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL 1.06ms 6s 1.84ms 5.3s 8.3s 334ms 22.3s 22.1s
XRP (3) 1.06ms 6s 1.84ms 5.3s 8.3s 334ms 22.3s 22.1s

What is the bot and how does it work? Everything is documented here!

Copy link

[Bot] Testing with 'Phosphore' βœ… 2 txs ($31.40) ⏲ 76.9s

βœ… 1 specs are successful: XRP

What is the bot and how does it work? Everything is documented here!

Details of the 2 mutations

Spec XRP (5)

Spec XRP found 5 XRP accounts. Will use XRP 2.3.2 on nanoS 2.1.0
undefined: 10.0537Β XRP (199ops) (rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ on 44'/144'/0'/0/0) #0 js:2:ripple:rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ:
undefined: 10.0609Β XRP (200ops) (rUv76ZmKzHvZdNhUwJbiNrYisSNEi6vRPe on 44'/144'/1'/0/0) #1 js:2:ripple:rUv76ZmKzHvZdNhUwJbiNrYisSNEi6vRPe:
undefined: 10.1932Β XRP (200ops) (rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j on 44'/144'/2'/0/0) #2 js:2:ripple:rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j:
undefined: 31.6666Β XRP (200ops) (rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH on 44'/144'/3'/0/0) #3 js:2:ripple:rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH:
undefined: 0Β XRP (0ops) (rxe3JoUuMsw2e4iCgpS9J72TRTyVU25yR on 44'/144'/4'/0/0) #4 js:2:ripple:rxe3JoUuMsw2e4iCgpS9J72TRTyVU25yR:
necessary accounts resynced in 0.40ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 10.1932Β XRP (200ops) (rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j on 44'/144'/2'/0/0) #2 js:2:ripple:rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j: (! sum of ops -1.984561Β XRP)
max spendable ~0.193206
β˜… using mutation 'move ~50%'
β†’ TO undefined: 31.6666Β XRP (200ops) (rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH on 44'/144'/3'/0/0) #3 js:2:ripple:rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH:
βœ”οΈ transaction 
SEND 0.093541Β XRP
TO rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH
with fee=0.00001Β XRP
  tag=123
STATUS (3.9s)
  amount: 0.093541Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 0.093551Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (4.4s) 
βœ”οΈ broadcasted! (47ms) optimistic operation: 
  -0.093541Β XRP      OUT        F29EE5FBA4859105A3E02839BB69290F14CB197DAA49E6FEA1E1B3CE8F769C29 2024-05-13T11:59
βœ”οΈ operation confirmed (11.2s): 
  -0.093551Β XRP      OUT        F29EE5FBA4859105A3E02839BB69290F14CB197DAA49E6FEA1E1B3CE8F769C29 2024-05-13T11:59
βœ”οΈ undefined: 10.0996Β XRP (201ops) (rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j on 44'/144'/2'/0/0) #2 js:2:ripple:rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j: (! sum of ops -2.078112Β XRP)(in 11.2s)
βœ”οΈ destination operation 
  +0.093541Β XRP      IN         F29EE5FBA4859105A3E02839BB69290F14CB197DAA49E6FEA1E1B3CE8F769C29 2024-05-13T11:59
(in 11.8s)

necessary accounts resynced in 15ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 31.7602Β XRP (201ops) (rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH on 44'/144'/3'/0/0) #3 js:2:ripple:rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH: (! sum of ops 11.158058Β XRP)
max spendable ~21.7602
β˜… using mutation 'move ~50%'
β†’ TO undefined: 10.0537Β XRP (199ops) (rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ on 44'/144'/0'/0/0) #0 js:2:ripple:rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ:
βœ”οΈ transaction 
SEND 10.773142Β XRP
TO rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ
with fee=0.00001Β XRP
STATUS (2496ms)
  amount: 10.773142Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 10.773152Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (3.6s) 
βœ”οΈ broadcasted! (266ms) optimistic operation: 
  -10.773142Β XRP     OUT        6001F8424F563B25CAC6DF3DC03A881CD66D59C53B2ACF462B28FB256A08F8CE 2024-05-13T11:59
βœ”οΈ operation confirmed (11.2s): 
  -10.773152Β XRP     OUT        6001F8424F563B25CAC6DF3DC03A881CD66D59C53B2ACF462B28FB256A08F8CE 2024-05-13T11:59
βœ”οΈ undefined: 20.987Β XRP (202ops) (rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH on 44'/144'/3'/0/0) #3 js:2:ripple:rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH: (! sum of ops 0.384906Β XRP)(in 11.2s)
βœ”οΈ destination operation 
  +10.773142Β XRP     IN         6001F8424F563B25CAC6DF3DC03A881CD66D59C53B2ACF462B28FB256A08F8CE 2024-05-13T11:59
(in 11.2s)


Portfolio ($31.40) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
XRP (5) 803 ops (+4), 21.9745Β XRP ($31.40) πŸ’ͺ 999+ rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ
undefined: 20.8268Β XRP (200ops) (rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ on 44'/144'/0'/0/0) #0 js:2:ripple:rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ:
undefined: 10.0609Β XRP (200ops) (rUv76ZmKzHvZdNhUwJbiNrYisSNEi6vRPe on 44'/144'/1'/0/0) #1 js:2:ripple:rUv76ZmKzHvZdNhUwJbiNrYisSNEi6vRPe:
undefined: 10.0996Β XRP (201ops) (rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j on 44'/144'/2'/0/0) #2 js:2:ripple:rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j:
undefined: 20.987Β XRP (202ops) (rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH on 44'/144'/3'/0/0) #3 js:2:ripple:rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH:
undefined: 0Β XRP (0ops) (rxe3JoUuMsw2e4iCgpS9J72TRTyVU25yR on 44'/144'/4'/0/0) #4 js:2:ripple:rxe3JoUuMsw2e4iCgpS9J72TRTyVU25yR:
Performance ⏲ 76.9s

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL 1.56ms 8.1s 16ms 6.4s 8s 313ms 22.4s 23s
XRP (4) 1.56ms 8.1s 16ms 6.4s 8s 313ms 22.4s 23s

What is the bot and how does it work? Everything is documented here!

Copy link
Contributor

@sprohaszka-ledger sprohaszka-ledger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting the code into different files :)

Some questions, but no hard blocker.

libs/coin-modules/coin-xrp/src/signer.ts Show resolved Hide resolved
libs/coin-modules/coin-xrp/src/types.ts Outdated Show resolved Hide resolved
@@ -0,0 +1,11 @@
/* istanbul ignore file: untested because empty */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why didn't you keep the content of the old cli-transaction file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just me doing a bad copy/paste of the EVM coin-module... (And I'm wondering now why this one is empty...) πŸ€¦β€β™‚οΈ

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the file back with some modifications for typing and removal of the lodash dep πŸ‘

@lambertkevin lambertkevin force-pushed the feature/coin-xrp branch 3 times, most recently from 2c154e4 to dedd719 Compare May 13, 2024 13:05
Copy link
Contributor

@sprohaszka-ledger sprohaszka-ledger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘Œ

Copy link

[Bot] Testing with 'Nitrogen' βœ… 2 txs ($22.31) ⏲ 71.5s

βœ… 1 specs are successful: XRP

What is the bot and how does it work? Everything is documented here!

Details of the 2 mutations

Spec XRP (4)

Spec XRP found 4 XRP accounts. Will use XRP 2.3.2 on nanoS 2.1.0
undefined: 10.4084Β XRP (200ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z:
undefined: 13.6071Β XRP (200ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH:
undefined: 19.99Β XRP (195ops) (rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn on 44'/144'/2'/0/0) #2 js:2:ripple:rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn:
undefined: 0Β XRP (0ops) (rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC on 44'/144'/3'/0/0) #3 js:2:ripple:rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC:
necessary accounts resynced in 0.27ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 10.4084Β XRP (200ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z: (! sum of ops -3.459825Β XRP)
max spendable ~0.408442
β˜… using mutation 'move ~50%'
β†’ TO undefined: 19.99Β XRP (195ops) (rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn on 44'/144'/2'/0/0) #2 js:2:ripple:rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn:
βœ”οΈ transaction 
SEND 0.19629Β XRP
TO rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn
with fee=0.00001Β XRP
STATUS (2265ms)
  amount: 0.19629Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 0.1963Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (3.8s) 
βœ”οΈ broadcasted! (263ms) optimistic operation: 
  -0.19629Β XRP       OUT        F8DC6AA57FAE5DC8881873765E611DA24741BEFFEF22B1ABCC6BDF68EF011CB9 2024-05-13T14:35
βœ”οΈ operation confirmed (11.2s): 
  -0.1963Β XRP        OUT        F8DC6AA57FAE5DC8881873765E611DA24741BEFFEF22B1ABCC6BDF68EF011CB9 2024-05-13T14:35
βœ”οΈ undefined: 10.2121Β XRP (201ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z: (! sum of ops -3.656125Β XRP)(in 11.2s)
βœ”οΈ destination operation 
  +0.19629Β XRP       IN         F8DC6AA57FAE5DC8881873765E611DA24741BEFFEF22B1ABCC6BDF68EF011CB9 2024-05-13T14:35
(in 11.2s)

necessary accounts resynced in 0.15ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 20.1863Β XRP (196ops) (rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn on 44'/144'/2'/0/0) #2 js:2:ripple:rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn:
max spendable ~10.1862
β˜… using mutation 'move ~50%'
β†’ TO undefined: 10.2121Β XRP (201ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z:
βœ”οΈ transaction 
SEND 5.167533Β XRP
TO r9etPtq3oboweMPju5gdYufmvwhH2euz8z
with fee=0.00001Β XRP
  tag=123
STATUS (2988ms)
  amount: 5.167533Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 5.167543Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (3.9s) 
βœ”οΈ broadcasted! (203ms) optimistic operation: 
  -5.167533Β XRP      OUT        4E9D9D33280804B222FFAA72DFB69E703748B3C72EB43CA7C42848B8739C39A7 2024-05-13T14:35
βœ”οΈ operation confirmed (11.2s): 
  -5.167543Β XRP      OUT        4E9D9D33280804B222FFAA72DFB69E703748B3C72EB43CA7C42848B8739C39A7 2024-05-13T14:36
βœ”οΈ undefined: 15.0187Β XRP (197ops) (rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn on 44'/144'/2'/0/0) #2 js:2:ripple:rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn:(in 11.2s)
βœ”οΈ destination operation 
  +5.167533Β XRP      IN         4E9D9D33280804B222FFAA72DFB69E703748B3C72EB43CA7C42848B8739C39A7 2024-05-13T14:36
(in 11.1s)


Portfolio ($22.31) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
XRP (4) 599 ops (+4), 14.0056Β XRP ($22.31) πŸ’ͺ 999+ r9etPtq3oboweMPju5gdYufmvwhH2euz8z
undefined: 15.3796Β XRP (202ops) (r9etPtq3oboweMPju5gdYufmvwhH2euz8z on 44'/144'/0'/0/0) #0 js:2:ripple:r9etPtq3oboweMPju5gdYufmvwhH2euz8z:
undefined: 13.6071Β XRP (200ops) (rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH on 44'/144'/1'/0/0) #1 js:2:ripple:rX5hKMbYJ2HmKV8se7b2QbbXRiPYArbkH:
undefined: 15.0187Β XRP (197ops) (rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn on 44'/144'/2'/0/0) #2 js:2:ripple:rMoFGec38toFg9ncbi9YbrYYmrP3G5exqn:
undefined: 0Β XRP (0ops) (rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC on 44'/144'/3'/0/0) #3 js:2:ripple:rrnxW3THwB1ubsE9V78Lek6V1XYnNrodxC:
Performance ⏲ 71.5s

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL 0.83ms 6s 0.83ms 5.3s 7.8s 467ms 22.4s 22.4s
XRP (3) 0.83ms 6s 0.83ms 5.3s 7.8s 467ms 22.4s 22.4s

What is the bot and how does it work? Everything is documented here!

Copy link

[Bot] Testing with 'Phosphore' βœ… 1 txs ❌ 1 txs ($31.38) ⏲ 5min 58s

βœ… 1 specs are successful: XRP
❌ 1 specs have problems: XRP

What is the bot and how does it work? Everything is documented here!

❌ 1 mutation errors
necessary accounts resynced in 0.48ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 20.8268Β XRP (199ops) (rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ on 44'/144'/0'/0/0) #0 js:2:ripple:rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ: (! sum of ops 8.345304Β XRP)
max spendable ~10.8268
β˜… using mutation 'move ~50%'
β†’ TO undefined: 10.0996Β XRP (200ops) (rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j on 44'/144'/2'/0/0) #2 js:2:ripple:rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j:
βœ”οΈ transaction 
SEND 5.354976Β XRP
TO rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j
with fee=0.00001Β XRP
  tag=123
STATUS (2993ms)
  amount: 5.354976Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 5.354986Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (4.5s) 
βœ”οΈ broadcasted! (126ms) optimistic operation: 
  -5.354976Β XRP      OUT        F8FB180EA6C10A6B1DDCC73EDE22976015C9985E6DCC6578A8012D319E762F2C 2024-05-13T14:49
βœ”οΈ operation confirmed (11.1s): 
  -5.354986Β XRP      OUT        F8FB180EA6C10A6B1DDCC73EDE22976015C9985E6DCC6578A8012D319E762F2C 2024-05-13T14:50
βœ”οΈ undefined: 15.4718Β XRP (200ops) (rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ on 44'/144'/0'/0/0) #0 js:2:ripple:rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ: (! sum of ops 2.990318Β XRP)(in 11.1s)
(in 4min 51s)
⚠️ TEST destination > account balance increased with transaction amount
Error: expect(received).toBe(expected) // Object.is equality

Expected: "15454641"
Received: "15454643"
(totally spent 5min 10s – ends at 2024-05-13T14:55:34.998Z)
Details of the 2 mutations

Spec XRP (5)

Spec XRP found 5 XRP accounts. Will use XRP 2.3.2 on nanoS 2.1.0
undefined: 20.8268Β XRP (199ops) (rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ on 44'/144'/0'/0/0) #0 js:2:ripple:rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ:
undefined: 10.0609Β XRP (200ops) (rUv76ZmKzHvZdNhUwJbiNrYisSNEi6vRPe on 44'/144'/1'/0/0) #1 js:2:ripple:rUv76ZmKzHvZdNhUwJbiNrYisSNEi6vRPe:
undefined: 10.0996Β XRP (200ops) (rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j on 44'/144'/2'/0/0) #2 js:2:ripple:rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j:
undefined: 20.987Β XRP (200ops) (rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH on 44'/144'/3'/0/0) #3 js:2:ripple:rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH:
undefined: 0Β XRP (0ops) (rxe3JoUuMsw2e4iCgpS9J72TRTyVU25yR on 44'/144'/4'/0/0) #4 js:2:ripple:rxe3JoUuMsw2e4iCgpS9J72TRTyVU25yR:
necessary accounts resynced in 0.48ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 20.8268Β XRP (199ops) (rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ on 44'/144'/0'/0/0) #0 js:2:ripple:rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ: (! sum of ops 8.345304Β XRP)
max spendable ~10.8268
β˜… using mutation 'move ~50%'
β†’ TO undefined: 10.0996Β XRP (200ops) (rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j on 44'/144'/2'/0/0) #2 js:2:ripple:rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j:
βœ”οΈ transaction 
SEND 5.354976Β XRP
TO rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j
with fee=0.00001Β XRP
  tag=123
STATUS (2993ms)
  amount: 5.354976Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 5.354986Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (4.5s) 
βœ”οΈ broadcasted! (126ms) optimistic operation: 
  -5.354976Β XRP      OUT        F8FB180EA6C10A6B1DDCC73EDE22976015C9985E6DCC6578A8012D319E762F2C 2024-05-13T14:49
βœ”οΈ operation confirmed (11.1s): 
  -5.354986Β XRP      OUT        F8FB180EA6C10A6B1DDCC73EDE22976015C9985E6DCC6578A8012D319E762F2C 2024-05-13T14:50
βœ”οΈ undefined: 15.4718Β XRP (200ops) (rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ on 44'/144'/0'/0/0) #0 js:2:ripple:rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ: (! sum of ops 2.990318Β XRP)(in 11.1s)
(in 4min 51s)
⚠️ TEST destination > account balance increased with transaction amount
Error: expect(received).toBe(expected) // Object.is equality

Expected: "15454641"
Received: "15454643"
(totally spent 5min 10s – ends at 2024-05-13T14:55:35.006Z)
necessary accounts resynced in 4.15ms
β–¬ XRP 2.3.2 on nanoS 2.1.0
β†’ FROM undefined: 15.4546Β XRP (203ops) (rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j on 44'/144'/2'/0/0) #2 js:2:ripple:rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j: (! sum of ops -6.414667Β XRP)
max spendable ~5.45463
β˜… using mutation 'move ~50%'
β†’ TO undefined: 15.4718Β XRP (200ops) (rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ on 44'/144'/0'/0/0) #0 js:2:ripple:rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ:
βœ”οΈ transaction 
SEND 2.677677Β XRP
TO rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ
with fee=0.00001Β XRP
STATUS (2208ms)
  amount: 2.677677Β XRP
  estimated fees: 0.00001Β XRP
  total spent: 2.677687Β XRP
errors: 
warnings: 
βœ”οΈ has been signed! (4s) 
βœ”οΈ broadcasted! (127ms) optimistic operation: 
  -2.677677Β XRP      OUT        9FDC554C91AC769940CE193E8C7D910BB32A5E30EDD95D4200581AC0F46E0742 2024-05-13T14:55
βœ”οΈ operation confirmed (11.2s): 
  -2.677687Β XRP      OUT        9FDC554C91AC769940CE193E8C7D910BB32A5E30EDD95D4200581AC0F46E0742 2024-05-13T14:55
βœ”οΈ undefined: 12.7769Β XRP (204ops) (rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j on 44'/144'/2'/0/0) #2 js:2:ripple:rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j: (! sum of ops -9.092354Β XRP)(in 11.2s)
βœ”οΈ destination operation 
  +2.677677Β XRP      IN         9FDC554C91AC769940CE193E8C7D910BB32A5E30EDD95D4200581AC0F46E0742 2024-05-13T14:55
(in 11.1s)


Portfolio ($31.38) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
XRP (5) 805 ops (+6), 21.9744Β XRP ($31.38) πŸ’ͺ 999+ rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ
undefined: 18.1495Β XRP (201ops) (rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ on 44'/144'/0'/0/0) #0 js:2:ripple:rP8phQ7XgRozw8Wg8cTgkWPT9ZL4VDydfQ:
undefined: 10.0609Β XRP (200ops) (rUv76ZmKzHvZdNhUwJbiNrYisSNEi6vRPe on 44'/144'/1'/0/0) #1 js:2:ripple:rUv76ZmKzHvZdNhUwJbiNrYisSNEi6vRPe:
undefined: 12.7769Β XRP (204ops) (rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j on 44'/144'/2'/0/0) #2 js:2:ripple:rpwCmxq8iWufXsPUQNvQY96HNVNTAi4o1j:
undefined: 20.987Β XRP (200ops) (rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH on 44'/144'/3'/0/0) #3 js:2:ripple:rUoYJBNPqEnBHbNZTKLLu4WuqMUAXzxYGH:
undefined: 0Β XRP (0ops) (rxe3JoUuMsw2e4iCgpS9J72TRTyVU25yR on 44'/144'/4'/0/0) #4 js:2:ripple:rxe3JoUuMsw2e4iCgpS9J72TRTyVU25yR:
Performance ⏲ 5min 58s

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL 1.74ms 8.3s 1275ms 5.2s 8.5s 253ms 22.2s 5min 3s
XRP (4) 1.74ms 8.3s 1275ms 5.2s 8.5s 253ms 22.2s 5min 3s

What is the bot and how does it work? Everything is documented here!

gre
gre previously approved these changes May 14, 2024
Copy link
Contributor

@gre gre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for live-hub scope (which is just the env lib)

Justkant
Justkant previously approved these changes May 14, 2024
Copy link
Contributor

@Justkant Justkant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for my part I just wonder if this change is really necessary


const CAN_EDIT_FEES = true;

const areFeesProvided = (tx: PlatformTransaction): boolean => !!tx.fee;

const convertToLiveTransaction = (tx: PlatformTransaction): Partial<Transaction> => {
return tx;
return { ...tx, family: "xrp" };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why we need to add family here as I would expect it to already be in the tx
I suppose it's for making sure you always have the correct one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Justkant This change is only here because I'm renaming the "ripple" family into "xrp" family, and since I can't control the Wallet API in the same PR as this change, I need to have a compatibility layer for now ensuring that a tx with a "ripple" family from the Wallet API would still work correctly once reaching the live.

Next step is to ask your team to rename the family to xrp as well and to remove this compatibility thingy πŸ‘

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok got it makes sense, thx for the details

@lambertkevin lambertkevin merged commit 801265b into develop May 15, 2024
62 of 88 checks passed
@lambertkevin lambertkevin deleted the feature/coin-xrp branch May 15, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Has changes in live-common desktop Has changes in LLD ledgerjs Has changes in the ledgerjs open source libs mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants