From dbdb35abb5a3c5838ec86ae3bed85b1b7eceb889 Mon Sep 17 00:00:00 2001 From: Chenna Keshava B S <21219765+ckeshava@users.noreply.github.com> Date: Tue, 2 Apr 2024 11:54:02 -0700 Subject: [PATCH] rectify the flag name tfNoRippleDirect (#2647) * rectify the flag name tfNoRippleDirect * Update th History.md file * use "Breaking Changes" heading in the API Changelog * Update HISTORY.md --------- --- packages/xrpl/HISTORY.md | 2 ++ packages/xrpl/src/models/transactions/payment.ts | 4 ++-- packages/xrpl/test/models/utils.test.ts | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/xrpl/HISTORY.md b/packages/xrpl/HISTORY.md index 47c299ef..cc9d2a84 100644 --- a/packages/xrpl/HISTORY.md +++ b/packages/xrpl/HISTORY.md @@ -3,6 +3,8 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xrpl-announce) for release announcements. We recommend that xrpl.js (ripple-lib) users stay up-to-date with the latest stable release. ## Unreleased +### BREAKING CHANGES +* Small fix in the API to use a new flag name `tfNoDirectRipple` instead of the existing flag name `tfNoRippleDirect` ### Fixed * Typo in `Channel` type `source_tab` -> `source_tag` diff --git a/packages/xrpl/src/models/transactions/payment.ts b/packages/xrpl/src/models/transactions/payment.ts index 4c1d66b3..91d0b86c 100644 --- a/packages/xrpl/src/models/transactions/payment.ts +++ b/packages/xrpl/src/models/transactions/payment.ts @@ -26,7 +26,7 @@ export enum PaymentFlags { * This is intended to force the transaction to take arbitrage opportunities. * Most clients do not need this. */ - tfNoDirectRipple = 0x00010000, + tfNoRippleDirect = 0x00010000, /** * If the specified Amount cannot be sent without spending more than SendMax, * reduce the received amount instead of failing outright. See Partial. @@ -88,7 +88,7 @@ export interface PaymentFlagsInterface extends GlobalFlags { * This is intended to force the transaction to take arbitrage opportunities. * Most clients do not need this. */ - tfNoDirectRipple?: boolean + tfNoRippleDirect?: boolean /** * If the specified Amount cannot be sent without spending more than SendMax, * reduce the received amount instead of failing outright. See Partial. diff --git a/packages/xrpl/test/models/utils.test.ts b/packages/xrpl/test/models/utils.test.ts index f5d34574..ec82ce11 100644 --- a/packages/xrpl/test/models/utils.test.ts +++ b/packages/xrpl/test/models/utils.test.ts @@ -100,7 +100,7 @@ describe('Models Utils', function () { Amount: '1234', Destination: 'rfkE1aSy9G8Upk4JssnwBxhEv5p4mn2KTy', Flags: { - tfNoDirectRipple: false, + tfNoRippleDirect: false, tfPartialPayment: true, tfLimitQuality: true, },