aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/types/ReserveTransaction.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-08-12 16:02:58 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-08-12 16:02:58 +0530
commit8d7b171d02e0ab4d5da7dc81eaea6c27106dbc57 (patch)
tree1ee7138d008cf8dcf2cd2a9f5a646701932d1ee5 /packages/taler-wallet-core/src/types/ReserveTransaction.ts
parent56f5a1e3abe2679b4913ac87ff82860bb9675823 (diff)
downloadwallet-core-8d7b171d02e0ab4d5da7dc81eaea6c27106dbc57.tar.xz
rename for consistency
Diffstat (limited to 'packages/taler-wallet-core/src/types/ReserveTransaction.ts')
-rw-r--r--packages/taler-wallet-core/src/types/ReserveTransaction.ts60
1 files changed, 30 insertions, 30 deletions
diff --git a/packages/taler-wallet-core/src/types/ReserveTransaction.ts b/packages/taler-wallet-core/src/types/ReserveTransaction.ts
index bdd9b0f93..0d946518f 100644
--- a/packages/taler-wallet-core/src/types/ReserveTransaction.ts
+++ b/packages/taler-wallet-core/src/types/ReserveTransaction.ts
@@ -23,9 +23,9 @@
*/
import {
codecForString,
- makeCodecForObject,
- makeCodecForConstString,
- makeCodecForUnion,
+ buildCodecForObject,
+ codecForConstString,
+ buildCodecForUnion,
Codec,
} from "../util/codec";
import {
@@ -182,54 +182,54 @@ export type ReserveTransaction =
export const codecForReserveWithdrawTransaction = (): Codec<
ReserveWithdrawTransaction
> =>
- makeCodecForObject<ReserveWithdrawTransaction>()
- .property("amount", codecForString)
- .property("h_coin_envelope", codecForString)
- .property("h_denom_pub", codecForString)
- .property("reserve_sig", codecForString)
- .property("type", makeCodecForConstString(ReserveTransactionType.Withdraw))
- .property("withdraw_fee", codecForString)
+ buildCodecForObject<ReserveWithdrawTransaction>()
+ .property("amount", codecForString())
+ .property("h_coin_envelope", codecForString())
+ .property("h_denom_pub", codecForString())
+ .property("reserve_sig", codecForString())
+ .property("type", codecForConstString(ReserveTransactionType.Withdraw))
+ .property("withdraw_fee", codecForString())
.build("ReserveWithdrawTransaction");
export const codecForReserveCreditTransaction = (): Codec<
ReserveCreditTransaction
> =>
- makeCodecForObject<ReserveCreditTransaction>()
- .property("amount", codecForString)
- .property("sender_account_url", codecForString)
+ buildCodecForObject<ReserveCreditTransaction>()
+ .property("amount", codecForString())
+ .property("sender_account_url", codecForString())
.property("timestamp", codecForTimestamp)
- .property("wire_reference", codecForString)
- .property("type", makeCodecForConstString(ReserveTransactionType.Credit))
+ .property("wire_reference", codecForString())
+ .property("type", codecForConstString(ReserveTransactionType.Credit))
.build("ReserveCreditTransaction");
export const codecForReserveClosingTransaction = (): Codec<
ReserveClosingTransaction
> =>
- makeCodecForObject<ReserveClosingTransaction>()
- .property("amount", codecForString)
- .property("closing_fee", codecForString)
- .property("exchange_pub", codecForString)
- .property("exchange_sig", codecForString)
- .property("h_wire", codecForString)
+ buildCodecForObject<ReserveClosingTransaction>()
+ .property("amount", codecForString())
+ .property("closing_fee", codecForString())
+ .property("exchange_pub", codecForString())
+ .property("exchange_sig", codecForString())
+ .property("h_wire", codecForString())
.property("timestamp", codecForTimestamp)
- .property("type", makeCodecForConstString(ReserveTransactionType.Closing))
- .property("wtid", codecForString)
+ .property("type", codecForConstString(ReserveTransactionType.Closing))
+ .property("wtid", codecForString())
.build("ReserveClosingTransaction");
export const codecForReserveRecoupTransaction = (): Codec<
ReserveRecoupTransaction
> =>
- makeCodecForObject<ReserveRecoupTransaction>()
- .property("amount", codecForString)
- .property("coin_pub", codecForString)
- .property("exchange_pub", codecForString)
- .property("exchange_sig", codecForString)
+ buildCodecForObject<ReserveRecoupTransaction>()
+ .property("amount", codecForString())
+ .property("coin_pub", codecForString())
+ .property("exchange_pub", codecForString())
+ .property("exchange_sig", codecForString())
.property("timestamp", codecForTimestamp)
- .property("type", makeCodecForConstString(ReserveTransactionType.Recoup))
+ .property("type", codecForConstString(ReserveTransactionType.Recoup))
.build("ReserveRecoupTransaction");
export const codecForReserveTransaction = (): Codec<ReserveTransaction> =>
- makeCodecForUnion<ReserveTransaction>()
+ buildCodecForUnion<ReserveTransaction>()
.discriminateOn("type")
.alternative(
ReserveTransactionType.Withdraw,