-
Notifications
You must be signed in to change notification settings - Fork 214
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 forget pending transaction endpoint (Part1) #845
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -298,6 +298,8 @@ data ApiNetworkInformation = ApiNetworkInformation | |
-- | Error codes returned by the API, in the form of snake_cased strings | ||
data ApiErrorCode | ||
= NoSuchWallet | ||
| NoSuchTransaction | ||
| TransactionNotPending | ||
| WalletAlreadyExists | ||
| NoRootKey | ||
| WrongEncryptionPassphrase | ||
|
@@ -734,6 +736,14 @@ instance MimeUnrender OctetStream PostExternalTransactionData where | |
instance MimeRender OctetStream PostExternalTransactionData where | ||
mimeRender _ (PostExternalTransactionData val) = BL.fromStrict val | ||
|
||
instance FromHttpApiData ApiTxId where | ||
parseUrlPiece txt = case fromText txt of | ||
Left (TextDecodingError err) -> Left $ T.pack err | ||
Right tid -> Right $ ApiTxId $ ApiT tid | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
|
||
instance ToHttpApiData ApiTxId where | ||
toUrlPiece (ApiTxId (ApiT tid)) = toText tid | ||
|
||
{------------------------------------------------------------------------------- | ||
Aeson Options | ||
-------------------------------------------------------------------------------} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. Good point 😅