Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add recipient to issue endpoint #69

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion generated/openapi/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,16 @@
},
"quantity": {
"$ref": "#/components/schemas/Quantity"
},
"recipient": {
"$ref": "#/components/schemas/Address"
}
},
"required": [
"issuer",
"asset_name",
"quantity"
"quantity",
"recipient"
],
"type": "object"
},
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Wst/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ issueProgrammableTokenEndpoint :: forall era env m.
, MonadUtxoQuery m
)
=> IssueProgrammableTokenArgs -> m (TextEnvelopeJSON (C.Tx era))
issueProgrammableTokenEndpoint IssueProgrammableTokenArgs{itaAssetName, itaQuantity, itaIssuer} = do
let C.ShelleyAddress _network cred _stake = itaIssuer
issueProgrammableTokenEndpoint IssueProgrammableTokenArgs{itaAssetName, itaQuantity, itaIssuer, itaRecipient} = do
let C.ShelleyAddress _network cred _stake = itaRecipient
destinationCredential = C.fromShelleyPaymentCredential cred
operatorEnv <- Env.loadOperatorEnvFromAddress itaIssuer
dirEnv <- asks Env.directoryEnv
Expand Down
1 change: 1 addition & 0 deletions src/lib/Wst/Server/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ data IssueProgrammableTokenArgs =
{ itaIssuer :: C.Address C.ShelleyAddr
, itaAssetName :: AssetName
, itaQuantity :: Quantity
, itaRecipient :: C.Address C.ShelleyAddr
}
deriving stock (Eq, Show, Generic)

Expand Down
Loading