-
Notifications
You must be signed in to change notification settings - Fork 119
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
Feature/xrp pkg #329
Feature/xrp pkg #329
Conversation
☁️ Nx Cloud ReportCI ran the following commands for commit e928404. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 3 targetsSent with 💌 from NxCloud. |
packages/blockchain/xrp/project.json
Outdated
"tsConfig": "packages/blockchain/xrp/tsconfig.lib.json", | ||
"packageJson": "packages/blockchain/xrp/package.json", | ||
"main": "packages/blockchain/xrp/src/index.ts", | ||
"assets": ["packages/blockchain/xrp/*.md"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove assets
*/ | ||
async sign(tx: ChainTransactionKMS, secret: string) { | ||
;(tx as PendingTransaction).chain = 'XRP' as any | ||
const rippleAPI = new RippleAPI() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to create RippleAPI every single time or we can move it line 7?
* @param body content of the transaction to broadcast | ||
* @returns transaction id of the transaction in the blockchain | ||
*/ | ||
export const sendTransaction = async (body: TransferXrpBlockchain) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to export this function?
* @param body content of the transaction to broadcast | ||
* @returns transaction data to be broadcast to blockchain. | ||
*/ | ||
export const prepareSignedTransaction = async (body: TransferXrpBlockchain) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to export this function?
const { address, secret } = await sdk.wallet() | ||
expect(address).toMatch(testData.ADDRESS_REGEX) | ||
expect(secret).toMatch(testData.SECRET_REGEX) | ||
} catch (e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need this try catch
No description provided.