diff options
| author | Florian Dold <florian@dold.me> | 2023-08-03 18:35:07 +0200 | 
|---|---|---|
| committer | Florian Dold <florian@dold.me> | 2023-08-03 18:35:07 +0200 | 
| commit | fdbd55d2bde0961a4c1ff26b04e442459ab782b0 (patch) | |
| tree | d0d04f42a5477f6d7d39a8940d59ff1548166711 /packages/taler-harness/src | |
| parent | 0fe4840ca2612dda06417cdebe5229eea98180be (diff) | |
-towards tip->reward rename
Diffstat (limited to 'packages/taler-harness/src')
3 files changed, 15 insertions, 15 deletions
| diff --git a/packages/taler-harness/src/harness/harness.ts b/packages/taler-harness/src/harness/harness.ts index 940e4258a..c9202c60e 100644 --- a/packages/taler-harness/src/harness/harness.ts +++ b/packages/taler-harness/src/harness/harness.ts @@ -51,8 +51,8 @@ import {    stringToBytes,    TalerError,    TalerProtocolDuration, -  TipCreateConfirmation, -  TipCreateRequest, +  RewardCreateConfirmation, +  RewardCreateRequest,    TippingReserveStatus,    WalletNotification,  } from "@gnu-taler/taler-util"; @@ -1751,8 +1751,8 @@ export namespace MerchantPrivateApi {    export async function giveTip(      merchantService: MerchantServiceInterface,      instance: string, -    req: TipCreateRequest, -  ): Promise<TipCreateConfirmation> { +    req: RewardCreateRequest, +  ): Promise<RewardCreateConfirmation> {      const reqUrl = new URL(        `private/tips`,        merchantService.makeInstanceBaseUrl(instance), diff --git a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts index c4db7022d..919097deb 100644 --- a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts +++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts @@ -191,12 +191,12 @@ export async function runAgeRestrictionsMerchantTest(t: GlobalTestState) {      const walletTipping = new WalletCli(t, "age-tipping"); -    const ptr = await walletTipping.client.call(WalletApiOperation.PrepareTip, { -      talerTipUri: tip.taler_tip_uri, +    const ptr = await walletTipping.client.call(WalletApiOperation.PrepareReward, { +      talerRewardUri: tip.taler_reward_uri,      }); -    await walletTipping.client.call(WalletApiOperation.AcceptTip, { -      walletTipId: ptr.walletTipId, +    await walletTipping.client.call(WalletApiOperation.AcceptReward, { +      walletRewardId: ptr.walletRewardId,      });      await walletTipping.runUntilDone(); diff --git a/packages/taler-harness/src/integrationtests/test-tipping.ts b/packages/taler-harness/src/integrationtests/test-tipping.ts index ff6fc9ceb..332f702d7 100644 --- a/packages/taler-harness/src/integrationtests/test-tipping.ts +++ b/packages/taler-harness/src/integrationtests/test-tipping.ts @@ -99,17 +99,17 @@ export async function runTippingTest(t: GlobalTestState) {    console.log("created tip", tip);    const doTip = async (): Promise<void> => { -    const ptr = await wallet.client.call(WalletApiOperation.PrepareTip, { -      talerTipUri: tip.taler_tip_uri, +    const ptr = await wallet.client.call(WalletApiOperation.PrepareReward, { +      talerRewardUri: tip.taler_reward_uri,      });      console.log(ptr); -    t.assertAmountEquals(ptr.tipAmountRaw, "TESTKUDOS:5"); -    t.assertAmountEquals(ptr.tipAmountEffective, "TESTKUDOS:4.85"); +    t.assertAmountEquals(ptr.rewardAmountRaw, "TESTKUDOS:5"); +    t.assertAmountEquals(ptr.rewardAmountEffective, "TESTKUDOS:4.85"); -    await wallet.client.call(WalletApiOperation.AcceptTip, { -      walletTipId: ptr.walletTipId, +    await wallet.client.call(WalletApiOperation.AcceptReward, { +      walletRewardId: ptr.walletRewardId,      });      await wallet.runUntilDone(); @@ -127,7 +127,7 @@ export async function runTippingTest(t: GlobalTestState) {      console.log("Transactions:", JSON.stringify(txns, undefined, 2)); -    t.assertDeepEqual(txns.transactions[0].type, "tip"); +    t.assertDeepEqual(txns.transactions[0].type, "reward");      t.assertDeepEqual(txns.transactions[0].txState.major, TransactionMajorState.Done);      t.assertAmountEquals(        txns.transactions[0].amountEffective, | 
