glifio / wallet

Glif Wallet
https://wallet.glif.io
80 stars 32 forks source link

feat: export static site #791

Closed olizilla closed 3 years ago

olizilla commented 3 years ago

I was able to use the local static site to connect to a Ledger and view some accounts.

So all aboard the content-addressing train 🚂🔗🔐✨ ...any reason not to host glif on IPFS? I can PR a CI job to build and pin and dnslink the static site if it is acceptable.

olizilla commented 3 years ago

What is the current hosting set up?

Schwartz10 commented 3 years ago

Thank you for trying again @olizilla !! Excited to test this out (will run this code early next week).

I wonder what must have changed for this to suddenly work?

So all aboard the content-addressing train 🚂🔗🔐✨ ...any reason not to host glif on IPFS? I can PR a CI job to build and pin and dnslink the static site if it is acceptable.

I think this is a fantastic idea. If you're up for submitting a PR, I can review them both at the same time.

What is the current hosting set

Hosting is handled on digital ocean for now (but we'd like to change this anyways...). We have a Travis CI runner to deploy latest changes from primary branch.

Ideally we'd get some GitHub actions set up like we have for the Glif Notary frontend https://github.com/glifio/verifier-frontend/blob/primary/.github/workflows/gcp-build-push-deploy-mainnet.yml. We can DM on Slack to figure out how to handle the IPFS hosting solution. We have a Glif ENS name that we could use as well

olizilla commented 3 years ago

I wonder what must have changed for this to suddenly work?

It was http-server! The current version add a charset to the content-type header for wasm requests

content-type: application/wasm; charset=utf-8

which makes the browser unhappy.

https://github.com/http-party/http-server/issues/618

olizilla commented 3 years ago

As for hosting we could pin it to an IPFS cluster in ci with https://github.com/ipfs-shipyard/ipfs-github-action or we could put it on https://fleek.co/

Schwartz10 commented 3 years ago

Hey @olizilla that makes a lot of sense as to why things are working now!

Re pinning the static build - I opened these two tickets which @ryanandersen from my team can weigh in on since he handles most of our devops stuff. https://github.com/glifio/wallet/issues/793 https://github.com/glifio/wallet/issues/794

cc @listenaddress too for the ENS setup

Merging this in and we can follow up with another PR when ready