Skip to content

Commit

Permalink
Rename old endpoints in Cardano.Wallet.Api.Link
Browse files Browse the repository at this point in the history
  • Loading branch information
rvl committed Sep 13, 2021
1 parent 17e5f1b commit 35e99e7
Show file tree
Hide file tree
Showing 12 changed files with 97 additions and 97 deletions.
8 changes: 4 additions & 4 deletions lib/core-integration/src/Test/Integration/Framework/DSL.hs
Expand Up @@ -1439,7 +1439,7 @@ fixtureMultiAssetRandomWallet ctx = do

-- send assets to Byron wallet
rtx <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley wMA) Default payload
(Link.createTransactionOld @'Shelley wMA) Default payload
expectResponseCode HTTP.status202 rtx

eventually "Byron wallet has assets" $ do
Expand Down Expand Up @@ -1480,7 +1480,7 @@ fixtureMultiAssetIcarusWallet ctx = do

-- send assets to Icarus wallet
rtx <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley wMA) Default payload
(Link.createTransactionOld @'Shelley wMA) Default payload
expectResponseCode HTTP.status202 rtx

eventually "Icarus wallet has assets" $ do
Expand Down Expand Up @@ -1905,7 +1905,7 @@ fixtureWalletWith ctx coins0 = do
"passphrase": #{fixturePassphrase}
}|]
request @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley src) Default payload
(Link.createTransactionOld @'Shelley src) Default payload
>>= expectResponseCode HTTP.status202
eventually "balance available = balance total" $ do
rb <- request @ApiWallet ctx
Expand Down Expand Up @@ -1970,7 +1970,7 @@ moveByronCoins ctx src (dest, addrs) coins = do
"passphrase": #{fixturePassphrase}
}|]
request @(ApiTransaction n) ctx
(Link.createTransaction @'Byron src) Default payload
(Link.createTransactionOld @'Byron src) Default payload
>>= expectResponseCode HTTP.status202
eventually "balance available = balance total" $ do
rb <- request @ApiByronWallet ctx
Expand Down
Expand Up @@ -142,7 +142,7 @@ spec = describe "BYRON_HW_WALLETS" $ do
"passphrase": "cardano-wallet"
}|]
rTrans <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Byron wSrc) Default payload
(Link.createTransactionOld @'Byron wSrc) Default payload
expectResponseCode HTTP.status202 rTrans

eventually "Wallet balance is as expected" $ do
Expand Down Expand Up @@ -197,7 +197,7 @@ spec = describe "BYRON_HW_WALLETS" $ do
"passphrase": "cardano-wallet"
}|]
rTrans <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Byron wSrc) Default payload
(Link.createTransactionOld @'Byron wSrc) Default payload
expectResponseCode HTTP.status403 rTrans
expectErrorMessage (errMsg403NoRootKey $ wSrc ^. walletId) rTrans

Expand Down Expand Up @@ -254,7 +254,7 @@ spec = describe "BYRON_HW_WALLETS" $ do
}|]

rFee <- request @ApiFee ctx
(Link.getTransactionFee @'Byron wSrc) Default payload
(Link.getTransactionFeeOld @'Byron wSrc) Default payload
expectResponseCode HTTP.status202 rFee

it "Can delete" $ \ctx -> runResourceT $ do
Expand Down
Expand Up @@ -152,7 +152,7 @@ spec = describe "BYRON_TRANSACTIONS" $ do
payload <- mkTxPayloadMA @n destination (minUTxOValue' * 2) [val] fixturePassphrase

rtx <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Byron wSrc) Default payload
(Link.createTransactionOld @'Byron wSrc) Default payload
expectResponseCode HTTP.status202 rtx

eventually "Payee wallet balance is as expected" $ do
Expand Down Expand Up @@ -184,7 +184,7 @@ spec = describe "BYRON_TRANSACTIONS" $ do
payload <- mkTxPayloadMA @n destination minUTxOValue' [val] fixturePassphrase

rtx <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Byron wSrc) Default payload
(Link.createTransactionOld @'Byron wSrc) Default payload
expectResponseCode HTTP.status403 rtx
expectErrorMessage "Some outputs have ada values that are too small." rtx

Expand All @@ -206,7 +206,7 @@ spec = describe "BYRON_TRANSACTIONS" $ do
payload <- mkTxPayloadMA @n destination 0 [val] fixturePassphrase

rtx <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Byron wSrc) Default payload
(Link.createTransactionOld @'Byron wSrc) Default payload
expectResponseCode HTTP.status202 rtx

eventually "Payee wallet balance is as expected" $ do
Expand Down Expand Up @@ -324,7 +324,7 @@ spec = describe "BYRON_TRANSACTIONS" $ do
}|]

rFeeEst <- request @ApiFee ctx
(Link.getTransactionFee @'Byron wByron) Default payload
(Link.getTransactionFeeOld @'Byron wByron) Default payload
verify rFeeEst
[ expectSuccess
, expectResponseCode HTTP.status202
Expand All @@ -333,7 +333,7 @@ spec = describe "BYRON_TRANSACTIONS" $ do
let (Quantity feeEstMax) = getFromResponse #estimatedMax rFeeEst

r <- postTx @n ctx
(wByron, Link.createTransaction @'Byron, fixturePassphrase)
(wByron, Link.createTransactionOld @'Byron, fixturePassphrase)
wShelley
amt
verify r
Expand Down
Expand Up @@ -1082,8 +1082,8 @@ spec = describe "SHARED_WALLETS" $ do
"passphrase": #{fixturePassphrase}
}|]
(_, ApiFee (Quantity _) (Quantity feeMax) _ _) <- unsafeRequest ctx
(Link.getTransactionFee @'Shelley wShelley) payloadTx
let ep = Link.createTransaction @'Shelley
(Link.getTransactionFeeOld @'Shelley wShelley) payloadTx
let ep = Link.createTransactionOld @'Shelley
rTx <- request @(ApiTransaction n) ctx (ep wShelley) Default payloadTx
expectResponseCode HTTP.status202 rTx
eventually "wShelley balance is decreased" $ do
Expand Down
Expand Up @@ -228,7 +228,7 @@ spec = describe "SHELLEY_ADDRESSES" $ do
}|]

rTrans <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley wSrc) Default payload
(Link.createTransactionOld @'Shelley wSrc) Default payload
expectResponseCode HTTP.status202 rTrans

-- make sure all transactions are in ledger
Expand Down Expand Up @@ -309,7 +309,7 @@ spec = describe "SHELLEY_ADDRESSES" $ do
"passphrase": #{fixturePassphrase}
}|]
(_, rtx) <- unsafeRequest @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley wA) payload
(Link.createTransactionOld @'Shelley wA) payload

-- 3. Check that there's one more used addresses on A.
--
Expand Down
Expand Up @@ -119,7 +119,7 @@ spec = describe "SHELLEY_HW_WALLETS" $ do
"passphrase": "cardano-wallet"
}|]
rTrans <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley wSrc) Default payload
(Link.createTransactionOld @'Shelley wSrc) Default payload
expectResponseCode HTTP.status202 rTrans

eventually "Wallet balance is as expected" $ do
Expand Down Expand Up @@ -174,7 +174,7 @@ spec = describe "SHELLEY_HW_WALLETS" $ do
"passphrase": "cardano-wallet"
}|]
rTrans <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley wSrc) Default payload
(Link.createTransactionOld @'Shelley wSrc) Default payload
expectResponseCode HTTP.status403 rTrans
expectErrorMessage (errMsg403NoRootKey $ wSrc ^. walletId) rTrans

Expand Down Expand Up @@ -231,7 +231,7 @@ spec = describe "SHELLEY_HW_WALLETS" $ do
}|]

rFee <- request @ApiFee ctx
(Link.getTransactionFee @'Shelley wSrc) Default payload
(Link.getTransactionFeeOld @'Shelley wSrc) Default payload
expectResponseCode HTTP.status202 rFee

it "Can delete" $ \ctx -> runResourceT $ do
Expand Down
Expand Up @@ -291,7 +291,7 @@ spec = describe "SHELLEY_STAKE_POOLS" $ do

-- cannot use rewards by default
r1 <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley src)
(Link.createTransactionOld @'Shelley src)
Default (Json payload)
expectResponseCode HTTP.status202 r1
eventually "Wallet has not consumed rewards" $ do
Expand Down Expand Up @@ -348,7 +348,7 @@ spec = describe "SHELLEY_STAKE_POOLS" $ do

waitForNextEpoch ctx
rTx <- request @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley src)
(Link.createTransactionOld @'Shelley src)
Default (Json payloadWithdrawal)
verify rTx
[ expectField #amount (.> (Quantity coin))
Expand Down Expand Up @@ -1293,7 +1293,7 @@ spec = describe "SHELLEY_STAKE_POOLS" $ do
}|]

request @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley w)
(Link.createTransactionOld @'Shelley w)
Default (Json payload)
>>= flip verify
[ expectResponseCode HTTP.status202 ]
Expand Down Expand Up @@ -1334,7 +1334,7 @@ spec = describe "SHELLEY_STAKE_POOLS" $ do
, "passphrase": #{fixturePassphrase}
}|]
request @(ApiTransaction n) ctx
(Link.createTransaction @'Shelley w)
(Link.createTransactionOld @'Shelley w)
Default (Json payload)
>>= flip verify
[ expectResponseCode HTTP.status202 ]
Expand Down

0 comments on commit 35e99e7

Please sign in to comment.