Add support for react-native in fedimint-sdk#239
Conversation
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
9b00aae to
0f151c8
Compare
packages/react-native/README.md
Outdated
|
|
||
| console.log('Using DB Path (Rust):', rustPath); | ||
|
|
||
| await new WalletDirector(new ReactNativeTransport(), rustPath); |
There was a problem hiding this comment.
awaiting a constructor feels strange? Think you can just remove the async.
| initialize(dbPath?: string): Promise<boolean> { | ||
| if (this.initPromise) return this.initPromise | ||
| if (testFilename) { | ||
| if (dbPath) { |
There was a problem hiding this comment.
add comment for the purpose of the dbPath
alexlwn123
left a comment
There was a problem hiding this comment.
great work... see comments
| } | ||
|
|
||
| async initialize() { | ||
| async initialize(dbPath?: string) { |
There was a problem hiding this comment.
remove param here? in the constructor, you must pass in the dbPath (assuming it's required). If you lazy load (and call initialize), it should use the dbPath passed in at the constructor (this.dbPath)
| } | ||
|
|
||
| // TODO: Make this stateful... handle listing/joining/opening/closing wallets at this level | ||
| async createWallet() { |
There was a problem hiding this comment.
add the initialize back in (https://github.com/fedimint/fedimint-sdk/pull/239/changes#r2687711921)
| * console.log(preview.config.global.meta.federation_name); // "My Federation" | ||
| * console.log(preview.config.global.consensus_version); | ||
| */ | ||
| async previewFederation(inviteCode: string): Promise<PreviewFederation> { |
There was a problem hiding this comment.
add the initialize back in (https://github.com/fedimint/fedimint-sdk/pull/239/changes#r2687711921)
| * const parsedCode = await director.parseInviteCode(inviteCode); | ||
| * console.log(parsedCode.federation_id, parsedCode.url); | ||
| */ | ||
| async parseInviteCode(inviteCode: string): Promise<ParsedInviteCode> { |
There was a problem hiding this comment.
add the initialize back in (https://github.com/fedimint/fedimint-sdk/pull/239/changes#r2687711921)
| * const parsedInvoice = await director.parseBolt11Invoice(invoiceStr); | ||
| * console.log(parsedInvoice.amount, parsedInvoice.expiry, parsedInvoice.memo); | ||
| */ | ||
| async parseBolt11Invoice(invoiceStr: string): Promise<ParsedBolt11Invoice> { |
There was a problem hiding this comment.
add the initialize back in (https://github.com/fedimint/fedimint-sdk/pull/239/changes#r2687711921)
There was a problem hiding this comment.
Add submodule initialization command in the contributing page in the docs?
flake.nix
Outdated
| pkgs.go | ||
| pkgs.rustup | ||
| pkgs.cmake | ||
| pkgs.gnumake | ||
| pkgs.cargo | ||
| pkgs.cargo-ndk | ||
| pkgs.libclang |
flake.nix
Outdated
| shellHook = '' | ||
| export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers} | ||
| export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true | ||
|
|
There was a problem hiding this comment.
add comment stating this was copied from fedixyz/fedi
| extra-trusted-public-keys = [ | ||
| "fedimint.cachix.org-1:FpJJjy1iPVlvyv4OMiN5y9+/arFLPcnZhZVVCHCDYTs=" | ||
| "fedibtc.cachix.org-1:KyG8I1663EYQm2ThciPUvjm1r9PHiZbOYz4goj+U76k=" | ||
| "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" |
There was a problem hiding this comment.
Seems OK. I wasn't even ware of the nix-community cache, but looks legit https://nix-community.org/cache/ so doesn't hurt to add it if you're pulling anything from nix-community
There was a problem hiding this comment.
10K lines?? is this all from react native?
9b53f0a to
795fdd8
Compare
Closes #75
Npm test package :
npm i @fedimint/react-native@0.0.0-om-rn1-dfe6143e445c58d8105884a823e1c5e9e7a3e589