Skip to content

Commit a12cd02

Browse files
authored
fix: add missing MPTAmount type to VaultDeposit & VaultWithdraw (XRPLF#3036)
add missing MPTAmount to Vault deposit & withdraw
1 parent b308843 commit a12cd02

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

packages/xrpl/src/models/common/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export interface MPTAmount {
2929
value: string
3030
}
3131

32+
// TODO: add MPTAmount to Amount once MPTv2 is released
3233
export type Amount = IssuedCurrencyAmount | string
3334

3435
export type ClawbackAmount = IssuedCurrencyAmount | MPTAmount

packages/xrpl/src/models/transactions/vaultDeposit.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Amount } from '../common'
1+
import { Amount, MPTAmount } from '../common'
22

33
import {
44
BaseTransaction,
@@ -24,7 +24,8 @@ export interface VaultDeposit extends BaseTransaction {
2424
/**
2525
* Asset amount to deposit.
2626
*/
27-
Amount: Amount
27+
// TODO: remove MPTAmount when MPTv2 is released
28+
Amount: Amount | MPTAmount
2829
}
2930

3031
/**

packages/xrpl/src/models/transactions/vaultWithdraw.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Amount } from '../common'
1+
import { Amount, MPTAmount } from '../common'
22

33
import {
44
BaseTransaction,
@@ -27,7 +27,8 @@ export interface VaultWithdraw extends BaseTransaction {
2727
/**
2828
* The exact amount of Vault asset to withdraw.
2929
*/
30-
Amount: Amount
30+
// TODO: remove MPTAmount when MPTv2 is released
31+
Amount: Amount | MPTAmount
3132

3233
/**
3334
* An account to receive the assets. It must be able to receive the asset.

0 commit comments

Comments
 (0)