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

1136 sdk split #89

Merged
merged 11 commits into from
Mar 17, 2021
Merged

1136 sdk split #89

merged 11 commits into from
Mar 17, 2021

Conversation

gh-23378
Copy link
Contributor

@gh-23378 gh-23378 commented Feb 22, 2021

PR divides the SDK between web3 related functionality and widget communication functionality to prepare for the introduction of a new starkware provider component

packages/portis-web3/src/web3/web3Manager.ts Outdated Show resolved Hide resolved
packages/portis-web3/src/widget/widgetManager.ts Outdated Show resolved Hide resolved
packages/portis-web3/src/widget/widgetManager.ts Outdated Show resolved Hide resolved
packages/portis-web3/src/widget/widgetManager.ts Outdated Show resolved Hide resolved
packages/portis-web3/src/interfaces.ts Show resolved Hide resolved
packages/portis-web3/src/web3/web3Manager.ts Show resolved Hide resolved
packages/portis-web3/src/web3/web3Manager.ts Show resolved Hide resolved
return;
}

let result: any = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is result really any?

break;

case 'eth_uninstallFilter':
this.engine.sendAsync(payload, _ => _);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the second argument necessary?

packages/portis-web3/src/web3/web3Manager.ts Outdated Show resolved Hide resolved
packages/portis-web3/src/web3/web3Manager.ts Show resolved Hide resolved
packages/portis-web3/src/web3/web3Manager.ts Outdated Show resolved Hide resolved
packages/portis-web3/src/web3/web3Manager.ts Show resolved Hide resolved

export default class Web3Manager {
private engine: ProviderEngine;
provider;
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 'provider' should be private, no?

@mimafogeus2 mimafogeus2 changed the base branch from master to develop March 16, 2021 12:51
@tomteman tomteman merged commit 075245a into develop Mar 17, 2021
tomteman added a commit that referenced this pull request Apr 20, 2021
* 1136 sdk split (#89)

* saving progress on sdk split, things do not currently compile and no new functionality has been added

* finished splitting SDK logic between web3 and widget - testing needed

* Fixed import paths to make SDK buildable.

* Added support for source map by setting the PORTIS_BUILD_SOURCE_MAPS environment variable.

* Passing config to web3Manager to unbreak.

* getWidgetCommunication method fixed

* rename config interface because it is shared across widget and web3, make a few methods static on widgetmanager

* expose web3provider via getter and config as top level property on sdk

* respond to tom's PR feedback

* respond to a subset of miki's comments as he is a HIGHLY demanding person

* increment version to 4 because we may have breaking changes

Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* HOTFIX: SSR fix now doesn't have typing problems. (#97)

* HOTFIX: SSR fix now doesn't have typing problems.

* TEMP

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* Task: Configure TS to work in strict mode, to minimize risks of braking other projects. (#98)

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* BUGFIX: Exposed methods were unbound, which could lead to unwanted edge cases. (#93)

This:
```
const showWidget = portis.showWidget;
showWidget();
```
wouldn't work, because `showWidget` isn't run from within `portis`, and thus its `this` wouldn't be `portis`.

Thanks @KatieN for finding this out.

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

Co-authored-by: Katie Noland <katienoland9@gmail.com>
Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Miki Stanger <miki.stanger@portis.io>
Co-authored-by: mimafogeus2 <github@foge.us>
tomteman added a commit that referenced this pull request Apr 20, 2021
* Upgrading master to 4.0.0 (#104)

* 1136 sdk split (#89)

* saving progress on sdk split, things do not currently compile and no new functionality has been added

* finished splitting SDK logic between web3 and widget - testing needed

* Fixed import paths to make SDK buildable.

* Added support for source map by setting the PORTIS_BUILD_SOURCE_MAPS environment variable.

* Passing config to web3Manager to unbreak.

* getWidgetCommunication method fixed

* rename config interface because it is shared across widget and web3, make a few methods static on widgetmanager

* expose web3provider via getter and config as top level property on sdk

* respond to tom's PR feedback

* respond to a subset of miki's comments as he is a HIGHLY demanding person

* increment version to 4 because we may have breaking changes

Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* HOTFIX: SSR fix now doesn't have typing problems. (#97)

* HOTFIX: SSR fix now doesn't have typing problems.

* TEMP

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* Task: Configure TS to work in strict mode, to minimize risks of braking other projects. (#98)

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* BUGFIX: Exposed methods were unbound, which could lead to unwanted edge cases. (#93)

This:
```
const showWidget = portis.showWidget;
showWidget();
```
wouldn't work, because `showWidget` isn't run from within `portis`, and thus its `this` wouldn't be `portis`.

Thanks @KatieN for finding this out.

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

Co-authored-by: Katie Noland <katienoland9@gmail.com>
Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Miki Stanger <miki.stanger@portis.io>
Co-authored-by: mimafogeus2 <github@foge.us>

* HOTFIX: Fixed bug where Portis was unable to sign typed data v3 messages. (#105)

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

Co-authored-by: Tom Teman <tomteman42@gmail.com>
Co-authored-by: Katie Noland <katienoland9@gmail.com>
Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Miki Stanger <miki.stanger@portis.io>
tomteman added a commit that referenced this pull request Jun 1, 2021
* 1136 sdk split (#89)

* saving progress on sdk split, things do not currently compile and no new functionality has been added

* finished splitting SDK logic between web3 and widget - testing needed

* Fixed import paths to make SDK buildable.

* Added support for source map by setting the PORTIS_BUILD_SOURCE_MAPS environment variable.

* Passing config to web3Manager to unbreak.

* getWidgetCommunication method fixed

* rename config interface because it is shared across widget and web3, make a few methods static on widgetmanager

* expose web3provider via getter and config as top level property on sdk

* respond to tom's PR feedback

* respond to a subset of miki's comments as he is a HIGHLY demanding person

* increment version to 4 because we may have breaking changes

Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* HOTFIX: SSR fix now doesn't have typing problems. (#97)

* HOTFIX: SSR fix now doesn't have typing problems.

* TEMP

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* Task: Configure TS to work in strict mode, to minimize risks of braking other projects. (#98)

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* BUGFIX: Exposed methods were unbound, which could lead to unwanted edge cases. (#93)

This:
```
const showWidget = portis.showWidget;
showWidget();
```
wouldn't work, because `showWidget` isn't run from within `portis`, and thus its `this` wouldn't be `portis`.

Thanks @KatieN for finding this out.

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* Master (#106)

* Upgrading master to 4.0.0 (#104)

* 1136 sdk split (#89)

* saving progress on sdk split, things do not currently compile and no new functionality has been added

* finished splitting SDK logic between web3 and widget - testing needed

* Fixed import paths to make SDK buildable.

* Added support for source map by setting the PORTIS_BUILD_SOURCE_MAPS environment variable.

* Passing config to web3Manager to unbreak.

* getWidgetCommunication method fixed

* rename config interface because it is shared across widget and web3, make a few methods static on widgetmanager

* expose web3provider via getter and config as top level property on sdk

* respond to tom's PR feedback

* respond to a subset of miki's comments as he is a HIGHLY demanding person

* increment version to 4 because we may have breaking changes

Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* HOTFIX: SSR fix now doesn't have typing problems. (#97)

* HOTFIX: SSR fix now doesn't have typing problems.

* TEMP

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* Task: Configure TS to work in strict mode, to minimize risks of braking other projects. (#98)

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* BUGFIX: Exposed methods were unbound, which could lead to unwanted edge cases. (#93)

This:
```
const showWidget = portis.showWidget;
showWidget();
```
wouldn't work, because `showWidget` isn't run from within `portis`, and thus its `this` wouldn't be `portis`.

Thanks @KatieN for finding this out.

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

Co-authored-by: Katie Noland <katienoland9@gmail.com>
Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Miki Stanger <miki.stanger@portis.io>
Co-authored-by: mimafogeus2 <github@foge.us>

* HOTFIX: Fixed bug where Portis was unable to sign typed data v3 messages. (#105)

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

Co-authored-by: Tom Teman <tomteman42@gmail.com>
Co-authored-by: Katie Noland <katienoland9@gmail.com>
Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* 2677 campaign details (#113)

* create getCampaignInfo sdk method, call into widget is breaking build

* create getCampaignInfo sdk method, call into widget is breaking build

* string interface workaround to fix build

* 2652 claim voucher (#116)

* claimvoucher sdk method

* pass ISDKConfig when claiming voucher (FULL METHOD requires it)

* Revert "pass ISDKConfig when claiming voucher (FULL METHOD requires it)"

This reverts commit 164e1f7.

Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Tom Teman <tomteman42@gmail.com>

Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Tom Teman <tomteman42@gmail.com>

* Removed portis-eos, moved portis-web3 to main dir (#117)

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* Added version deploy CircleCI config. (#119)

Co-authored-by: Miki Stanger <miki.stanger@portis.io>

* Bumping version to 4.0.2

Co-authored-by: Katie Noland <katienoland9@gmail.com>
Co-authored-by: katien <katien.nol@shapeshift.io>
Co-authored-by: Miki Stanger <miki.stanger@portis.io>
Co-authored-by: mimafogeus2 <github@foge.us>
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.

3 participants