Skip to content

Commit

Permalink
Remove checks for owner address
Browse files Browse the repository at this point in the history
  • Loading branch information
gostkin committed Dec 12, 2023
1 parent 0248309 commit 1befbef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions packages/engine/paima-funnel/src/cde/cardanoProjectedNFT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ function eventToCdeDatum(
blockNumber: number
): CdeCardanoProjectedNFTDatum | null {
if (
event.ownerAddress === null ||
event.ownerAddress == '' ||
event.actionTxId === null ||
event.actionTxId == '' ||
event.status === null ||
event.actionTxId == ''
event.status == ''
) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,14 @@ export interface ICdeCardanoProjectedNftUpdateDataQuery {
result: ICdeCardanoProjectedNftUpdateDataResult;
}

const cdeCardanoProjectedNftUpdateDataIR: any = {"usedParamSet":{"previous_tx_hash":true,"previous_tx_output_index":true,"new_tx_hash":true,"new_tx_output_index":true,"status":true,"plutus_datum":true,"for_how_long":true,"cde_id":true,"owner_address":true,"asset":true,"amount":true},"params":[{"name":"previous_tx_hash","required":true,"transform":{"type":"scalar"},"locs":[{"a":60,"b":77},{"a":415,"b":432}]},{"name":"previous_tx_output_index","required":true,"transform":{"type":"scalar"},"locs":[{"a":111,"b":136},{"a":468,"b":493}]},{"name":"new_tx_hash","required":true,"transform":{"type":"scalar"},"locs":[{"a":161,"b":173}]},{"name":"new_tx_output_index","required":true,"transform":{"type":"scalar"},"locs":[{"a":206,"b":226}]},{"name":"status","required":true,"transform":{"type":"scalar"},"locs":[{"a":242,"b":249}]},{"name":"plutus_datum","required":true,"transform":{"type":"scalar"},"locs":[{"a":271,"b":284}]},{"name":"for_how_long","required":true,"transform":{"type":"scalar"},"locs":[{"a":306,"b":319}]},{"name":"cde_id","required":true,"transform":{"type":"scalar"},"locs":[{"a":340,"b":347}]},{"name":"owner_address","required":true,"transform":{"type":"scalar"},"locs":[{"a":373,"b":387}]},{"name":"asset","required":true,"transform":{"type":"scalar"},"locs":[{"a":511,"b":517}]},{"name":"amount","required":true,"transform":{"type":"scalar"},"locs":[{"a":536,"b":543}]}],"statement":"UPDATE cde_cardano_projected_nft\nSET\n previous_tx_hash = :previous_tx_hash!,\n previous_tx_output_index = :previous_tx_output_index!,\n current_tx_hash = :new_tx_hash!,\n current_tx_output_index = :new_tx_output_index!,\n status = :status!,\n plutus_datum = :plutus_datum!,\n for_how_long = :for_how_long!\nWHERE\n cde_id = :cde_id!\n AND owner_address = :owner_address!\n AND current_tx_hash = :previous_tx_hash!\n AND current_tx_output_index = :previous_tx_output_index!\n AND asset = :asset!\n AND amount = :amount!\nRETURNING previous_tx_hash, previous_tx_output_index"};
const cdeCardanoProjectedNftUpdateDataIR: any = {"usedParamSet":{"owner_address":true,"previous_tx_hash":true,"previous_tx_output_index":true,"new_tx_hash":true,"new_tx_output_index":true,"status":true,"plutus_datum":true,"for_how_long":true,"cde_id":true,"asset":true,"amount":true},"params":[{"name":"owner_address","required":true,"transform":{"type":"scalar"},"locs":[{"a":57,"b":71}]},{"name":"previous_tx_hash","required":true,"transform":{"type":"scalar"},"locs":[{"a":97,"b":114},{"a":412,"b":429}]},{"name":"previous_tx_output_index","required":true,"transform":{"type":"scalar"},"locs":[{"a":148,"b":173},{"a":465,"b":490}]},{"name":"new_tx_hash","required":true,"transform":{"type":"scalar"},"locs":[{"a":198,"b":210}]},{"name":"new_tx_output_index","required":true,"transform":{"type":"scalar"},"locs":[{"a":243,"b":263}]},{"name":"status","required":true,"transform":{"type":"scalar"},"locs":[{"a":279,"b":286}]},{"name":"plutus_datum","required":true,"transform":{"type":"scalar"},"locs":[{"a":308,"b":321}]},{"name":"for_how_long","required":true,"transform":{"type":"scalar"},"locs":[{"a":343,"b":356}]},{"name":"cde_id","required":true,"transform":{"type":"scalar"},"locs":[{"a":377,"b":384}]},{"name":"asset","required":true,"transform":{"type":"scalar"},"locs":[{"a":508,"b":514}]},{"name":"amount","required":true,"transform":{"type":"scalar"},"locs":[{"a":533,"b":540}]}],"statement":"UPDATE cde_cardano_projected_nft\nSET\n owner_address = :owner_address!,\n previous_tx_hash = :previous_tx_hash!,\n previous_tx_output_index = :previous_tx_output_index!,\n current_tx_hash = :new_tx_hash!,\n current_tx_output_index = :new_tx_output_index!,\n status = :status!,\n plutus_datum = :plutus_datum!,\n for_how_long = :for_how_long!\nWHERE\n cde_id = :cde_id!\n AND current_tx_hash = :previous_tx_hash!\n AND current_tx_output_index = :previous_tx_output_index!\n AND asset = :asset!\n AND amount = :amount!\nRETURNING previous_tx_hash, previous_tx_output_index"};

/**
* Query generated from SQL:
* ```
* UPDATE cde_cardano_projected_nft
* SET
* owner_address = :owner_address!,
* previous_tx_hash = :previous_tx_hash!,
* previous_tx_output_index = :previous_tx_output_index!,
* current_tx_hash = :new_tx_hash!,
Expand All @@ -138,7 +139,6 @@ const cdeCardanoProjectedNftUpdateDataIR: any = {"usedParamSet":{"previous_tx_ha
* for_how_long = :for_how_long!
* WHERE
* cde_id = :cde_id!
* AND owner_address = :owner_address!
* AND current_tx_hash = :previous_tx_hash!
* AND current_tx_output_index = :previous_tx_output_index!
* AND asset = :asset!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ INSERT INTO cde_cardano_projected_nft(
/* @name cdeCardanoProjectedNftUpdateData */
UPDATE cde_cardano_projected_nft
SET
owner_address = :owner_address!,
previous_tx_hash = :previous_tx_hash!,
previous_tx_output_index = :previous_tx_output_index!,
current_tx_hash = :new_tx_hash!,
Expand All @@ -37,7 +38,6 @@ SET
for_how_long = :for_how_long!
WHERE
cde_id = :cde_id!
AND owner_address = :owner_address!
AND current_tx_hash = :previous_tx_hash!
AND current_tx_output_index = :previous_tx_output_index!
AND asset = :asset!
Expand Down

0 comments on commit 1befbef

Please sign in to comment.