From b605a2cdcc2ac8ca27e3b44036b2ea375069ac89 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Tue, 4 Nov 2025 21:07:01 -0500 Subject: [PATCH] Add integer enforcement when converting to XRP/MPTAmount to Number --- include/xrpl/protocol/MPTAmount.h | 2 +- include/xrpl/protocol/XRPAmount.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xrpl/protocol/MPTAmount.h b/include/xrpl/protocol/MPTAmount.h index af14786501..1c7c7a25e7 100644 --- a/include/xrpl/protocol/MPTAmount.h +++ b/include/xrpl/protocol/MPTAmount.h @@ -64,7 +64,7 @@ public: operator Number() const noexcept { - return value(); + return {value(), Number::strong}; } /** Return the sign of the amount */ diff --git a/include/xrpl/protocol/XRPAmount.h b/include/xrpl/protocol/XRPAmount.h index e102a3707f..f26bb7366f 100644 --- a/include/xrpl/protocol/XRPAmount.h +++ b/include/xrpl/protocol/XRPAmount.h @@ -143,7 +143,7 @@ public: operator Number() const noexcept { - return drops(); + return {drops(), Number::weak}; } /** Return the sign of the amount */