Skip to content

Commit

Permalink
Removing with data types due to discussion on mcip/60
Browse files Browse the repository at this point in the history
  • Loading branch information
wjuan-mob committed Mar 23, 2023
1 parent 31f5858 commit 962582a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 347 deletions.
22 changes: 0 additions & 22 deletions fog/sample-paykit/src/cached_tx_data/memo_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,6 @@ impl MemoHandler {
Err(MemoHandlerError::UnknownSender)
}
}
MemoType::AuthenticatedSenderWithData(memo) => {
if let Some(addr) = self.contacts.get(&memo.sender_address_hash()) {
if bool::from(memo.validate(
addr,
&account_key.default_subaddress_view_private(),
&tx_out.public_key,
)) {
Ok(Some(memo_type))
} else {
Err(MemoHandlerError::FailedHmacValidation)
}
} else {
Err(MemoHandlerError::UnknownSender)
}
}
MemoType::AuthenticatedSenderWithPaymentIntentId(memo) => {
if let Some(addr) = self.contacts.get(&memo.sender_address_hash()) {
if bool::from(memo.validate(
Expand Down Expand Up @@ -138,13 +123,6 @@ impl MemoHandler {
Err(MemoHandlerError::FailedSubaddressValidation)
}
}
MemoType::DestinationWithData(_) => {
if subaddress_matches_tx_out(account_key, CHANGE_SUBADDRESS_INDEX, tx_out)? {
Ok(Some(memo_type))
} else {
Err(MemoHandlerError::FailedSubaddressValidation)
}
}
MemoType::DestinationWithPaymentRequestId(_) => {
if subaddress_matches_tx_out(account_key, CHANGE_SUBADDRESS_INDEX, tx_out)? {
Ok(Some(memo_type))
Expand Down
7 changes: 3 additions & 4 deletions transaction/extra/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ mod unsigned_tx;

pub use memo::{
compute_authenticated_sender_memo, compute_destination_memo, AuthenticatedSenderMemo,
AuthenticatedSenderWithDataMemo, AuthenticatedSenderWithPaymentIntentIdMemo,
AuthenticatedSenderWithPaymentRequestIdMemo, BurnRedemptionMemo, DefragmentationMemo,
DefragmentationMemoError, DestinationMemo, DestinationMemoError, DestinationWithDataMemo,
DestinationWithPaymentIntentIdMemo, DestinationWithPaymentRequestIdMemo,
AuthenticatedSenderWithPaymentIntentIdMemo, AuthenticatedSenderWithPaymentRequestIdMemo,
BurnRedemptionMemo, DefragmentationMemo, DefragmentationMemoError, DestinationMemo,
DestinationMemoError, DestinationWithPaymentIntentIdMemo, DestinationWithPaymentRequestIdMemo,
GiftCodeCancellationMemo, GiftCodeFundingMemo, GiftCodeSenderMemo, MemoDecodingError, MemoType,
RegisteredMemoType, SenderMemoCredential, UnusedMemo,
};
Expand Down
139 changes: 0 additions & 139 deletions transaction/extra/src/memo/authenticated_sender_with_data.rs

This file was deleted.

176 changes: 0 additions & 176 deletions transaction/extra/src/memo/destination_with_data.rs

This file was deleted.

Loading

0 comments on commit 962582a

Please sign in to comment.