Skip to content

feat(solana-swap): with all of previous PR suggestions applied.#2

Merged
shamardy merged 3 commits intoGLEECBTC:solana-swap-v1from
mj-blockydevs:solana-swap-v1-2
Jun 6, 2024
Merged

feat(solana-swap): with all of previous PR suggestions applied.#2
shamardy merged 3 commits intoGLEECBTC:solana-swap-v1from
mj-blockydevs:solana-swap-v1-2

Conversation

@mj-blockydevs
Copy link
Copy Markdown

@mj-blockydevs mj-blockydevs commented Jun 5, 2024

List of applied suggestions:

  • Removed msg calls.
  • Removed unused variables. IMPORTANT: For now, I've left unused struct properties to avoid changing the communication interface with the program. My main goal was to apply all suggestions without touching the "tests.rs" file, to ensure the business logic behind the program remained unchanged.
  • Broke the code into smaller functions. I've not only moved them to separate functions but also placed the functions in a dedicated module for clarity. Let me know if you are okay with this decision.
  • Using invoke_signed without the system program account. Let me know if I understood this particular requirement correctly.
  • Replaced panicking asserts with supported Solana Errors. Let me know if the ones I used are okay for you.
  • Removed inner scopes where they were not necessary.

Do you want me to prepare unit tests for the functions moved to the /utils directory, or are the already prepared tests sufficient for us at this stage?

Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
…e transfer operation. Only sender and receiver are involved.

Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
@mj-blockydevs mj-blockydevs changed the title feat: Solana Swap with all of previous PR suggestions applied. feat(solana-swap): with all of previous PR suggestions applied. Jun 5, 2024
@laruh
Copy link
Copy Markdown

laruh commented Jun 6, 2024

@mj-blockydevs please run cargo fmt

@laruh laruh requested review from laruh and shamardy June 6, 2024 03:56
Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas+instead@blockydevs.com>
@shamardy shamardy merged commit af690d2 into GLEECBTC:solana-swap-v1 Jun 6, 2024
@mj-blockydevs mj-blockydevs deleted the solana-swap-v1-2 branch June 25, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants