Version 1.0.9 introduced a new way of creating (and activating wallets). Your code snippet shows the way how to create wallets with version 1.0.9.
Previously, you would not rely on manually creating wallets, but instead just pass a number into the activate endpoint for the respective contract:
curl -s -H "Content-Type: application/json" \
--request POST \
--data '{"caID": "GameContract", "caWallet":{"getWallet": 1}}' \
http://localhost:9080/api/contract/activate | jq
In version 1.0.9, you use the getWalletID
from your requests to the wallet create endpoint to activate the given contract (e.g. GameContract that is shipped with the plutus-starter):
curl -s -H "Content-Type: application/json" \
--request POST \
--data '{"caID": "GameContract", "caWallet":{"getWalletId": '$WALLET_ID_1'}}' \
http://localhost:9080/api/contract/activate | jq
Looking at the plutus repo, it appears that the Wallet API has gone through some significant changes. Could it be that your JSON Object did not have the wiWallet.getWalletID but wiWallet.getWallet key? If that's the case, then the jq tool would grab a non-existent key from the JSON object, thus returning null. This would happen if you still have an older plutus version installed while trying to follow the directions that apply to the newer API.
The reason I'm suggesting this as a possibility is this commit: https://github.com/input-output-hk/plutus/commit/58c8b4bde7177a18cd6761ba328bc105e5c82a47#diff-c00cadb75428bc7238834d185e1e7e63dde8e3d1313b34e6a046f623abb78322
Solution: Update your local plutus library so it matches the docs.