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

chore: changes from dev into main #183

Merged
merged 24 commits into from
May 7, 2024
Merged

chore: changes from dev into main #183

merged 24 commits into from
May 7, 2024

Conversation

wainola
Copy link
Contributor

@wainola wainola commented Apr 23, 2024

Description

Bringing changes from dev into main

Related Issue Or Context

Closes: #

How Has This Been Tested? Testing details.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Checklist:

  • I have commented my code, particularly in hard-to-understand areas.
  • I have ensured that all acceptance criteria (or expected behavior) from issue are met
  • I have updated the documentation locally and in sygma-docs.
  • I have added tests to cover my changes.
  • I have ensured that all the checks are passing and green, I've signed the CLA bot

mpetrunic and others added 14 commits February 21, 2024 10:35
## Description

Added retry sdk initialization

## Related Issue Or Context

#96

Closes: #96 

## How Has This Been Tested? Testing details.

- Tested locally

## Types of changes

Changes:
    

- [x] Added state in widget component to keep track of sdk
initialization
- [x] Added event to be fired when sdk is initialized
- [x] Retry sdk init method
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Related Issue Or Context

<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Otherwise, describe context and motivation for change here -->

Closes: #<issue>

## How Has This Been Tested? Testing details.

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have ensured that all acceptance criteria (or expected behavior)
from issue are met
- [ ] I have updated the documentation locally and in sygma-docs.
- [ ] I have added tests to cover my changes.
- [ ] I have ensured that all the checks are passing and green, I've
signed the CLA bot

Signed-off-by: Marin Petrunic <[email protected]>
This PR adds UI in widget to display fee that will be charged on
`FungibleTransfer`

## Description

- [X] Added Transfer detail component
- [X] Modified `buildEvmFungibleTransactions` to store fee in component
state
- [X] Fixed button visibility issue

## Related Issue Or Context

#55

Closes: #55 

## How Has This Been Tested? Testing details.

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

- [X] Component Added with styles
- [X] Fixed button visibility issue
- [X] Changes added to `buildTransactions` and `buildEvmTransactions`
methods

## Checklist:
- [ ] Add `sygma-fungible-transfer-detail` tests
Signed-off-by: Marin Petrunic <[email protected]>
Co-authored-by: Filip Štoković <[email protected]>
Co-authored-by: Nicolás Riquelme Guzmán <[email protected]>
Co-authored-by: Saad Ahmed <[email protected]>
Co-authored-by: mj52951 <[email protected]>
Co-authored-by: mj52951 <[email protected]>
Co-authored-by: Marin Petrunic <[email protected]>
Add functionality to enable users to specify `onboard.js` wallet modules

## Description

Add Widget property `wallets` that accepts list of `WalletInit[]`
objects from 3rd party app

## Related Issue Or Context

[Enable adding other web3
wallets](#87)

Closes: #87

## Types of changes

- [x] `WalletController` now supports ability to specify onboard wallets

---------

Co-authored-by: Filip Štoković <[email protected]>
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Related Issue Or Context

<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Otherwise, describe context and motivation for change here -->

Closes: #93 

## How Has This Been Tested? Testing details.

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have ensured that all acceptance criteria (or expected behavior)
from issue are met
- [ ] I have updated the documentation locally and in sygma-docs.
- [ ] I have added tests to cover my changes.
- [ ] I have ensured that all the checks are passing and green, I've
signed the CLA bot

---------

Signed-off-by: Marin Petrunic <[email protected]>
Co-authored-by: Marin Petrunić <[email protected]>
Co-authored-by: Saad Ahmed Siddiqui <[email protected]>
Co-authored-by: Marin Petrunic <[email protected]>
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->
import/no-cycle rule was parsing dependencies causing slow eslint
execution. With this change ci/lint will run a lot faster

Before:

![image](https://github.com/sygmaprotocol/sygma-widget/assets/8836210/4c9dd540-9b99-422d-a34e-9130ab1cce7c)


After:

![image](https://github.com/sygmaprotocol/sygma-widget/assets/8836210/b1c7c031-ab21-4433-8d41-78556eff82f1)


## Related Issue Or Context

<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Otherwise, describe context and motivation for change here -->

Closes: #<issue>

## How Has This Been Tested? Testing details.

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have ensured that all acceptance criteria (or expected behavior)
from issue are met
- [ ] I have updated the documentation locally and in sygma-docs.
- [ ] I have added tests to cover my changes.
- [ ] I have ensured that all the checks are passing and green, I've
signed the CLA bot

Signed-off-by: Marin Petrunic <[email protected]>
<!--- Provide a general summary of your changes in the Title above -->

## Description

- brings last changes from main into dev. I had to cherry pick those
commits, because since the last merge, doing a PR from main to dev
resulted in a lot of conflicts and duplicated changes.
- Main has two commits that weren't included in the last merge. One of
those commits is needed for #168

<!--- Describe your changes in detail -->

## Related Issue Or Context

<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Otherwise, describe context and motivation for change here -->

Closes: #<issue>

## How Has This Been Tested? Testing details.

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have ensured that all acceptance criteria (or expected behavior)
from issue are met
- [ ] I have updated the documentation locally and in sygma-docs.
- [ ] I have added tests to cover my changes.
- [ ] I have ensured that all the checks are passing and green, I've
signed the CLA bot

---------

Signed-off-by: Marin Petrunic <[email protected]>
Co-authored-by: Marin Petrunić <[email protected]>
Co-authored-by: Anton Lykhoyda <[email protected]>
<!--- Provide a general summary of your changes in the Title above -->

## Description

Whenever user switches to a unsuported network, upon swtich error we
allow the user to add the network

<!--- Describe your changes in detail -->

## Related Issue Or Context

<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Otherwise, describe context and motivation for change here -->

Closes: #132 

## How Has This Been Tested? Testing details.

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have ensured that all acceptance criteria (or expected behavior)
from issue are met
- [ ] I have updated the documentation locally and in sygma-docs.
- [ ] I have added tests to cover my changes.
- [ ] I have ensured that all the checks are passing and green, I've
signed the CLA bot

---------

Signed-off-by: Marin Petrunic <[email protected]>
Co-authored-by: Marin Petrunić <[email protected]>
Co-authored-by: Filip Štoković <[email protected]>
Co-authored-by: Anton Lykhoyda <[email protected]>
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->
- display amount to receive in destination

## Related Issue Or Context

<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Otherwise, describe context and motivation for change here -->

Closes: #156 

## How Has This Been Tested? Testing details.

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have ensured that all acceptance criteria (or expected behavior)
from issue are met
- [ ] I have updated the documentation locally and in sygma-docs.
- [ ] I have added tests to cover my changes.
- [ ] I have ensured that all the checks are passing and green, I've
signed the CLA bot

---------

Signed-off-by: Marin Petrunic <[email protected]>
Co-authored-by: Marin Petrunić <[email protected]>
Co-authored-by: Filip Štoković <[email protected]>
Co-authored-by: Anton Lykhoyda <[email protected]>
Co-authored-by: Saad Ahmed <[email protected]>
Co-authored-by: mj52951 <[email protected]>
Co-authored-by: mj52951 <[email protected]>
## Description
Display gas estimation of transactions that will be executed

## Related Issue Or Context
Closes: #157

## How Has This Been Tested? Testing details.
- [x] Mocked gas fee test 

## Types of changes
- [x] Transactions gas fee estimations for evm and substrate networks

## Checklist:
- [x] Add tests.
@mpetrunic
Copy link
Member

Please do not merge, once approved, I will create merge commit on main branch^^

mpetrunic
mpetrunic previously approved these changes Apr 23, 2024
@@ -169,31 +265,30 @@ export class FungibleTokenTransferController implements ReactiveController {

onDestinationAddressChange = (address: string): void => {
this.destinationAddress = address;

if (this.destinationAddress && this.destinationAddress.length === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it was wrongly overwritten, the entire story https://github.com/sygmaprotocol/sygma-widget/pull/176/files which was merged to master is reverted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I restore the changes, could you please let me know if there is anything missing? I think not but better to have two pair of eyes here

Copy link
Contributor

@Lykhoyda Lykhoyda left a comment

Choose a reason for hiding this comment

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

please double check the code changes, I spotted that the bug fix from https://github.com/sygmaprotocol/sygma-widget/pull/176/files was almost everywhere reverted to the state of the dev branch. I'm not sure about other stories, but it worth to check again

@Lykhoyda
Copy link
Contributor

@wainola deployed version https://d633b65c.sygma-widget.pages.dev/ has infinite loader, something is wrong with initSdk state probably

Screenshot 2024-04-24 at 18 08 09

@wainola
Copy link
Contributor Author

wainola commented Apr 24, 2024

@wainola deployed version https://d633b65c.sygma-widget.pages.dev/ has infinite loader, something is wrong with initSdk state probably

Screenshot 2024-04-24 at 18 08 09

fixed @Lykhoyda

@Lykhoyda
Copy link
Contributor

@wainola have you been able to finish the transfer? For me, it stuck on the:
cannot estimate gas; transaction may fail or may require manual gas limit

Screenshot 2024-04-25 at 16 50 28

Lykhoyda
Lykhoyda previously approved these changes Apr 29, 2024
@wainola
Copy link
Contributor Author

wainola commented Apr 30, 2024

@wainola have you been able to finish the transfer? For me, it stuck on the: cannot estimate gas; transaction may fail or may require manual gas limit

Screenshot 2024-04-25 at 16 50 28

@Lykhoyda solved, could you re-test on your side?

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.

4 participants