-
Notifications
You must be signed in to change notification settings - Fork 169
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
Polkadot identicons #301
Polkadot identicons #301
Conversation
find one Solved with root directory specification in following is a simple config file: module.exports = {
verbose: true,
roots: ['<rootDir>/src'],
}; |
…ity-signer into tbaut-polkadot-identicons
ok I was able to create a signed and fully working apk.. although it takes ages, the building of the metro bundle is long the first time but quite snappy after. @hanwencheng if you say it's working well on iphone, I'd remove my identicon samples and merge. |
shim.js
Outdated
// running on VSCode debugger | ||
global.Buffer = undefined | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we are not using nodify
, does these Buffer
related code still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, IIRC the shim.js was generated by the nodify --HACK script right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. It seems that process.browser = true;
is still needed though. I removed the rest and things still work.. on android at least 👍
(I get a "process.split
undefined" if I remove the process.browser = true;
)
As we talked about in person with @hanwencheng, it seems that the 'crypto' override done here isn't picked-up correctly. I'd advise to try in this order:
if things still don't work:
if things still don't work:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, successful tested on iOS simulator
@@ -0,0 +1 @@ | |||
process.browser = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't a shim anymore, so maybe just set process.browser = true
directly in App.js now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷♂️ happy to remove that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying it in Apps throws
undefined is not and object (evaluating process.version.split)
Not renaming it after discussion because it still is a black magic shim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, just minor comments
bring in
@polkadot/reactnative-identicon
and the needed wasm deps. Striped down as much as I could. The building time is actually ok the second time (still last a couple min the first time)Set
--max_old_space_size=8192
in scripts to avoid out of memory problemupgrade
react-native
(0.60.4),bignumber.js
,hoist-non-react-statics
remove some unused deps:
react-native-simple-picker
,yarn
added a sample of identicon, should be removed before merging. It should look like: