wormhole-foundation / example-liquidity-layer

Apache License 2.0
11 stars 11 forks source link

solana: pay the original payers back #193

Open a5-pickle opened 1 month ago

a5-pickle commented 1 month ago
livthomas commented 1 month ago

We have found another issue in add_auction_history_entry. There are two parameters:

I think after changes made in this PR, beneficiary_token is no longer needed. You can add a constraint directly on beneficiary so it would need to be equal to auction. prepared_by.

a5-pickle commented 1 month ago

We have found another issue in add_auction_history_entry. There are two parameters:

  • beneficiary

    • receives SOL from closed auction account
  • beneficiary_token

    • needs to be owned by beneficiary
    • needs to be equal to initial_offer_token

I think after changes made in this PR, beneficiary_token is no longer needed. You can add a constraint directly on beneficiary so it would need to be equal to auction. prepared_by.

Very good catch! How does this look? https://github.com/wormhole-foundation/example-liquidity-layer/pull/193/commits/c6bd633745634f4be688aacf67c307c6a027b8c4