sparkswap / sparkswap-desktop

Buy Bitcoin instantly on the Lightning Network
https://sparkswap.com
MIT License
37 stars 18 forks source link

Fix a few compile issues #6

Closed Free-FreeThinker closed 4 years ago

Free-FreeThinker commented 4 years ago

Fix a few compile issues:

  1. Address https://github.com/sparkswap/sparkswap-desktop/issues/5 that duplicated formatters.ts and formatters.tsx causing build failure.

  2. Remove location.ts as it's now replaced by jurisdiction.ts, and it's causing compile failure as it's trying to import getApprovedLocations from server.ts, which had already been renamed. Error message: Module '"src/sparkswap-desktop/src/web/domain/server"' has no exported member 'getApprovedLocations'. TS2305

  3. Use capitalized 1st letter for both Onboarding module and Onboarding directory, and fix compile error File name 'src/sparkswap-desktop/src/web/ui/Onboarding.tsx' differs from already included file name 'src/sparkswap-desktop/src/web/ui/onboarding.tsx' only in casing. TS1149

  4. Fix missing onboardingVersion property of RegisterDialogProps in Onboarding.tsx. Error message: TypeScript error in src/sparkswap-desktop/src/web/ui/App.tsx(257,11): Type '{ onProceed: () => Promise<void>; isOpen: boolean; onClose: () => void; onboardingVersion: number | undefined; uuid: string | undefined; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<RegisterDialog> & Readonly<RegisterDialogProps> & Readonly<...>'. Property 'onboardingVersion' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<RegisterDialog> & Readonly<RegisterDialogProps> & Readonly<...>'. TS2322

dannypaz commented 4 years ago

@Free-FreeThinker thank you a ton for this PR. The issue with compiling has to do with the way we are exporting sparkswap-desktop (which is location.ts was still inside the repo when it should have been removed instead).

Im going to port your fixes and put them in the next release. if you have any questions, let me know

An example is that Onboarding.tsx still exists in this repo too, however everything from onboarding was moved