diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-03 19:57:08 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-03 19:57:08 +0100 |
commit | 358c0ce513ecc28d8e03fcb97f57391874e86f74 (patch) | |
tree | eedff518d09ab69203cb8e9a67464e83f78c94b1 /lib/wallet | |
parent | dd45721babce86d964739fded589447e9db98cbc (diff) |
add merchant instance field at the right places
Diffstat (limited to 'lib/wallet')
-rw-r--r-- | lib/wallet/types.ts | 24 | ||||
-rw-r--r-- | lib/wallet/wallet.ts | 6 |
2 files changed, 30 insertions, 0 deletions
diff --git a/lib/wallet/types.ts b/lib/wallet/types.ts index d5e0d53da..be3bb2a19 100644 --- a/lib/wallet/types.ts +++ b/lib/wallet/types.ts @@ -336,6 +336,30 @@ export interface WalletBalanceEntry { } +interface Merchant { + /** + * label for a location with the business address of the merchant + */ + address: string; + + /** + * the merchant's legal name of business + */ + name: string; + + /** + * label for a location that denotes the jurisdiction for disputes. + * Some of the typical fields for a location (such as a street address) may be absent. + */ + jurisdiction: string; + + /** + * Instance of the merchant, in case one merchant + * represents multiple receivers. + */ + instance?: string; +} + @Checkable.Class export class Contract { @Checkable.String diff --git a/lib/wallet/wallet.ts b/lib/wallet/wallet.ts index f0aeb6800..cc600aef9 100644 --- a/lib/wallet/wallet.ts +++ b/lib/wallet/wallet.ts @@ -147,6 +147,11 @@ interface PayReq { timestamp: string; transaction_id: number; pay_deadline: string; + /** + * Merchant instance identifier that should receive the + * payment, if applicable. + */ + instance?: string; } interface Transaction { @@ -590,6 +595,7 @@ export class Wallet { pay_deadline: offer.contract.pay_deadline, timestamp: offer.contract.timestamp, transaction_id: offer.contract.transaction_id, + instance: offer.contract.merchant.instance }; let t: Transaction = { contractHash: offer.H_contract, |