Skip to content

Commit

Permalink
My stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
emccorson committed Feb 26, 2024
1 parent bf75b18 commit 1348e5a
Show file tree
Hide file tree
Showing 12 changed files with 694 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
use flake
CC=emcc

patch .git/hooks/commit-msg -s --forward -r - -i commit-msg.patch
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ yarn-error.log*
!.yarn/releases
!.yarn/sdks
!.yarn/versions

masp-params/*.params
.direnv/
trees/
4 changes: 4 additions & 0 deletions .ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
build
*.lock
trees
30 changes: 30 additions & 0 deletions apps/extension/src/Setup/ImportAccount/SeedPhraseImport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,36 @@ export const SeedPhraseImport: React.FC<Props> = ({ onConfirm }) => {
Array.from(mnemonicsRange)
);

React.useEffect(() => {
setMnemonics([
"liar",
"bird",
"install",
"win",
"wool",
"venue",
"observe",
"maid",
"flock",
"clap",
"bullet",
"myth",
"illness",
"trip",
"bread",
"fresh",
"polar",
"smart",
"use",
"lunar",
"tired",
"embody",
"come",
"deer",
]);
setMnemonicType(MnemonicTypes.TwentyFourWords);
}, []);

const privateKeyError = (() => {
const validation = validatePrivateKey(filterPrivateKeyPrefix(privateKey));
if (validation.ok) {
Expand Down
12 changes: 6 additions & 6 deletions apps/extension/src/background/web-workers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export const init = (
if (msgName === INIT_MSG) {
w.postMessage(data);
} else if (msgName === TRANSFER_SUCCESSFUL_MSG) {
transferCompletedHandler(data.msgId, true, payload).then(() =>
w.terminate()
);
transferCompletedHandler(data.msgId, true, payload).then(() => {
//w.terminate()
});
} else if (msgName === TRANSFER_FAILED_MSG) {
transferCompletedHandler(data.msgId, false, payload).then(() =>
w.terminate()
);
transferCompletedHandler(data.msgId, false, payload).then(() => {
//w.terminate()
});
} else if (msgName === WEB_WORKER_ERROR_MSG) {
sendResponse?.({ error: payload });
} else {
Expand Down
29 changes: 29 additions & 0 deletions apps/namada-interface/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Specify the following if you wish to override the defaults defined in @anoma/chains:

# NAMADA
NAMADA_INTERFACE_NAMADA_ALIAS=Namada Testnet
NAMADA_INTERFACE_NAMADA_CHAIN_ID=localnet.c0d1f497cada88a0b4b6c
NAMADA_INTERFACE_NAMADA_URL=http://127.0.0.1:27657
NAMADA_INTERFACE_NAMADA_BECH32_PREFIX=atest
NAMADA_INTERFACE_NAMADA_FAUCET_ADDRESS=atest1v4ehgw368pprgvjygv652w2yg3znvd69xucnvde3xaz5ysenx5myx3f389z5yv3nxg65xv3kx0fkez
NAMADA_INTERFACE_NAMADA_FAUCET_LIMIT=1000

# COSMOS
NAMADA_INTERFACE_COSMOS_ALIAS=Cosmos Testnet
NAMADA_INTERFACE_COSMOS_CHAIN_ID=cosmoshub-4
NAMADA_INTERFACE_COSMOS_URL=https://rpc.sentry-01.theta-testnet.polypore.xyz

# OSMOSIS
NAMADA_INTERFACE_OSMOSIS_ALIAS=Osmosis Testnet
NAMADA_INTERFACE_OSMOSIS_CHAIN_ID=osmosis-testnet.123412341234
NAMADA_INTERFACE_OSMOSIS_URL=http://127.0.0.1:54321

# ETH
NAMADA_INTERFACE_ETH_ALIAS=Eth Testnet
NAMADA_INTERFACE_ETH_CHAIN_ID="0x7A69"
NAMADA_INTERFACE_ETH_URL=http://127.0.0.1:12345

# ETH smart contracts
NAMADA_INTERFACE_CONTRACT_ADDR_ETH_BRIDGE="0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"

NAMADA_INTERFACE_MASP_PARAMS_PATH=http://127.0.0.1:8080/
4 changes: 4 additions & 0 deletions commit-msg.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1c1
< #!/bin/bash
---
> #!/usr/bin/env bash
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
rustup
#wasm-bindgen-cli
(callPackage ./wasm-bindgen-cli.nix { })
wasm-pack
binaryen
protobuf
yarn
nodejs-18_x
emscripten #using emcc because I can't get gcc or clang to work
nodePackages.web-ext
wget
cargo-watch
];
};
}
);
}
Loading

0 comments on commit 1348e5a

Please sign in to comment.