Skip to content

Commit

Permalink
integration test fix
Browse files Browse the repository at this point in the history
corrections
  • Loading branch information
paweljakubas committed Sep 27, 2023
1 parent adcc04e commit a076070
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ spec = describe "SHELLEY_WALLETS" $ do
"name": "Some Wallet",
"mnemonic_sentence": #{m21},
"passphrase": #{fixturePassphrase},
"one_change_address": true
"one_change_address_mode": true
} |]
rWal <- postWallet ctx payloadCreate
expectResponseCode HTTP.status201 rWal
Expand All @@ -557,7 +557,7 @@ spec = describe "SHELLEY_WALLETS" $ do
--send funds to
let minUTxOValue' = minUTxOValue (_mainEra ctx)
addrs1 <- listAddresses @n ctx wOneChangeAddr
let destOneChange = (addrs1 !! 0) ^. #id
let destOneChange = (head addrs1) ^. #id
let payloadTx amt destination = Json [json|{
"payments": [{
"address": #{destination},
Expand Down Expand Up @@ -595,7 +595,7 @@ spec = describe "SHELLEY_WALLETS" $ do
>>= verifyAddrs (initialTotal1+1) (initialUsed1+1)

addrs2 <- listAddresses @n ctx wFixture
let destFixture = (addrs2 !! 0) ^. #id
let destFixture = (head addrs2) ^. #id
forM_ [1,1,1,1,1] $ \num -> realizeTx wOneChangeAddr (num * minUTxOValue') destFixture

-- the fixture wallet has still 20 unused external addresses, 10 used external addresses,
Expand Down Expand Up @@ -627,7 +627,7 @@ spec = describe "SHELLEY_WALLETS" $ do
-- the one change address wallet has 20 unused external addresses and 3 used change addresses
-- and 1 used external address
listAddresses @n ctx wOneChangeAddr
>>= verifyAddrs (initialTotal1+4) (initialUsed1+3)
>>= verifyAddrs (initialTotal1+4) (initialUsed1+4)

it "WALLETS_GET_01 - can get wallet details" $ \ctx -> runResourceT $ do
w <- emptyWallet ctx
Expand Down
19 changes: 7 additions & 12 deletions specifications/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ x-walletDiscovery: &walletDiscovery
- sequential
example: sequential

x-oneChangeAddressMode: &oneChangeAddressMode
type: boolean
default: false

x-walletName: &walletName
type: string
maxLength: 255
Expand Down Expand Up @@ -2970,10 +2974,7 @@ components:
mnemonic_second_factor: *walletSecondFactor
passphrase: *walletPassphrase
address_pool_gap: *walletAddressPoolGap
one_change_address_mode:
schema:
type: boolean
default: false
one_change_address_mode: *oneChangeAddressMode

ApiAccountPostData: &ApiAccountPostData
type: object
Expand Down Expand Up @@ -3075,10 +3076,7 @@ components:
payment_script_template: *scriptTemplateEntry
delegation_script_template: *scriptTemplateEntry
script_validation: *validationLevel
one_change_address_mode:
schema:
type: boolean
default: false
one_change_address_mode: *oneChangeAddressMode

ApiSharedWalletPostDataFromAccountPubX: &ApiSharedWalletPostDataFromAccountPubX
type: object
Expand Down Expand Up @@ -3423,10 +3421,7 @@ components:
type: object
properties:
name: *walletName
one_change_address_mode:
schema:
type: boolean
default: false
one_change_address_mode: *oneChangeAddressMode

ApiPostAccountKeyData: &ApiPostAccountKeyData
type: object
Expand Down

0 comments on commit a076070

Please sign in to comment.