Skip to content
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

Feat/remove wallet from pool if low balance #97

Merged
merged 28 commits into from
Sep 21, 2023

Conversation

abhidtu2014
Copy link
Contributor

@abhidtu2014 abhidtu2014 commented Aug 31, 2023

Task

  • Add functionality for removing/adding back the wallet from the pool of the resources
  • We will be removing the wallet from the pool based on the minThreshold set from the rebalance config
  • Fix minor issues
  • Add test cases based on ganache, fixed existing test cases
  • Adds New wallet interface that will be used by wallet-middleware in relayer-engine-middleware

@abhidtu2014 abhidtu2014 requested a review from a team August 31, 2023 12:55
@abhidtu2014 abhidtu2014 force-pushed the feat/remove-wallet-from-pool-if-low-balance branch from 6576977 to 2c56f24 Compare August 31, 2023 14:30
.github/workflows/test.yml Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/wallets/base-wallet.ts Outdated Show resolved Hide resolved
src/wallets/evm/index.ts Outdated Show resolved Hide resolved
src/wallets/wallet-pool.ts Outdated Show resolved Hide resolved
test/wallet-manager.test.ts Outdated Show resolved Hide resolved
@solanoepalacio
Copy link
Collaborator

If I understand correctly there are two features on this PR:

  • removing the wallet from the pool if balance is not enough
  • changing the wallet interface to support the new wallet middleware
    I know this probably happened because of the mention to the balance on the wallet-interface ticket, he... we'll do better at ticket refinement :)
    In the mean time... I think we would be ok marking the remove wallet from pool if... ticket to ready to release or done

@abhidtu2014 abhidtu2014 force-pushed the feat/remove-wallet-from-pool-if-low-balance branch from a88c228 to 488c6d2 Compare September 14, 2023 12:13
src/chain-wallet-manager.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
export const ETH_ADDR = "0xFa6E597ca1c7E72838c850d1268dDf618D444712";
export const ETH_ADDR_2 = "0x0EaC31cB932229D0Dcc628f89894012b7827481c";

export const checkIfWalletIsReady = async (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love that you made this a utility right away 🖤
Seems the right abstraction

@abhidtu2014 abhidtu2014 merged commit c7ddab1 into main Sep 21, 2023
1 check passed
@abhidtu2014 abhidtu2014 deleted the feat/remove-wallet-from-pool-if-low-balance branch September 21, 2023 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants