diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-04 10:40:52 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-05 08:52:56 -0300 |
commit | 5e1f450a20aa00c1783337a3b6024167dbc568bd (patch) | |
tree | a9bc015261c0784c5f02f8c4795f7ceb66571acc /packages/merchant-backoffice-ui/src/hooks | |
parent | cbf0f839542f7eda88cdc2a5c7b602e690309154 (diff) | |
download | wallet-core-5e1f450a20aa00c1783337a3b6024167dbc568bd.tar.xz |
remove unused types
Diffstat (limited to 'packages/merchant-backoffice-ui/src/hooks')
-rw-r--r-- | packages/merchant-backoffice-ui/src/hooks/reserve.test.ts | 10 | ||||
-rw-r--r-- | packages/merchant-backoffice-ui/src/hooks/transfer.ts | 20 |
2 files changed, 11 insertions, 19 deletions
diff --git a/packages/merchant-backoffice-ui/src/hooks/reserve.test.ts b/packages/merchant-backoffice-ui/src/hooks/reserve.test.ts index 79c8c9229..a7b97794d 100644 --- a/packages/merchant-backoffice-ui/src/hooks/reserve.test.ts +++ b/packages/merchant-backoffice-ui/src/hooks/reserve.test.ts @@ -80,7 +80,7 @@ describe("reserve api interaction with listing", () => { }, response: { reserve_pub: "22", - payto_uri: "payto", + accounts: [], }, }); @@ -218,7 +218,7 @@ describe("reserve api interaction with details", () => { env.addRequestExpectation(API_GET_RESERVE_BY_ID("11"), { response: { - payto_uri: "payto://here", + accounts: [{ payto_uri: "payto://here" }], tips: [{ reason: "why?", tip_id: "id1", total_amount: "USD:10" }], } as MerchantBackend.Tips.ReserveDetail, qparam: { @@ -265,7 +265,7 @@ describe("reserve api interaction with details", () => { env.addRequestExpectation(API_GET_RESERVE_BY_ID("11"), { response: { - payto_uri: "payto://here", + accounts: [{ payto_uri: "payto://here" }], tips: [ { reason: "why?", tip_id: "id1", total_amount: "USD:10" }, { reason: "not", tip_id: "id2", total_amount: "USD:12" }, @@ -313,7 +313,7 @@ describe("reserve api interaction with details", () => { env.addRequestExpectation(API_GET_RESERVE_BY_ID("11"), { response: { - payto_uri: "payto://here", + accounts: [{ payto_uri: "payto://here" }], tips: [{ reason: "why?", tip_id: "id1", total_amount: "USD:10" }], } as MerchantBackend.Tips.ReserveDetail, qparam: { @@ -360,7 +360,7 @@ describe("reserve api interaction with details", () => { env.addRequestExpectation(API_GET_RESERVE_BY_ID("11"), { response: { - payto_uri: "payto://here", + accounts: [{ payto_uri: "payto://here" }], tips: [ { reason: "why?", tip_id: "id1", total_amount: "USD:10" }, { reason: "not", tip_id: "id2", total_amount: "USD:12" }, diff --git a/packages/merchant-backoffice-ui/src/hooks/transfer.ts b/packages/merchant-backoffice-ui/src/hooks/transfer.ts index e21dd1dd5..649cef06c 100644 --- a/packages/merchant-backoffice-ui/src/hooks/transfer.ts +++ b/packages/merchant-backoffice-ui/src/hooks/transfer.ts @@ -34,17 +34,11 @@ export function useTransferAPI(): TransferAPI { const informTransfer = async ( data: MerchantBackend.Transfers.TransferInformation, - ): Promise< - HttpResponseOk<MerchantBackend.Transfers.MerchantTrackTransferResponse> - > => { - const res = - await request<MerchantBackend.Transfers.MerchantTrackTransferResponse>( - `/private/transfers`, - { - method: "POST", - data, - }, - ); + ): Promise<HttpResponseOk<{}>> => { + const res = await request<{}>(`/private/transfers`, { + method: "POST", + data, + }); await mutateAll(/.*private\/transfers.*/); return res; @@ -56,9 +50,7 @@ export function useTransferAPI(): TransferAPI { export interface TransferAPI { informTransfer: ( data: MerchantBackend.Transfers.TransferInformation, - ) => Promise< - HttpResponseOk<MerchantBackend.Transfers.MerchantTrackTransferResponse> - >; + ) => Promise<HttpResponseOk<{}>>; } export interface InstanceTransferFilter { |