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: call deposit method #21

Merged
merged 5 commits into from
Mar 20, 2023
Merged

feat: call deposit method #21

merged 5 commits into from
Mar 20, 2023

Conversation

irubido
Copy link
Collaborator

@irubido irubido commented Mar 14, 2023

Closes #12

src/routes/root/Summary.tsx Show resolved Hide resolved
src/routes/root/Summary.tsx Outdated Show resolved Hide resolved
@irubido irubido requested a review from mpetrunic March 17, 2023 11:51
Copy link
Collaborator

@BeroBurny BeroBurny left a comment

Choose a reason for hiding this comment

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

3.6

Copy link
Member

@mpetrunic mpetrunic left a comment

Choose a reason for hiding this comment

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

I'm approving if this is blocking something, but those things should be addressed in separate PRs

const depositFee = await depositAdapterContract.methods._depositFee().call();
const depositFeeBigint = wallet.web3.utils.toBigInt(depositFee);

const BRIDGE_FEE = '0.001';
Copy link
Member

Choose a reason for hiding this comment

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

can be separate PR with less of a priority but this should also be fetched from contract.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

will open issue

src/routes/root/Summary.tsx Show resolved Hide resolved
src/routes/root/Summary.tsx Show resolved Hide resolved
src/routes/root/Summary.tsx Show resolved Hide resolved
src/routes/root/Summary.tsx Show resolved Hide resolved
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const provider = wallet.web3.currentProvider as any;
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
provider.on('chainChanged', (chainId: number) => {
Copy link
Member

Choose a reason for hiding this comment

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

@BeroBurny Could you check whats happening here. I can see web3 has chainChanged event types in Web3BaseProvider. Could you figure out why this callback is different from typed one

Copy link
Collaborator

Choose a reason for hiding this comment

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

@irubido irubido merged commit 94a3ad6 into main Mar 20, 2023
@irubido irubido deleted the irubido/callDepositMethod branch March 20, 2023 15:13
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.

Call deposit method
4 participants