Skip to content

Commit

Permalink
chore: rename anoma to namada
Browse files Browse the repository at this point in the history
Closes #323.
  • Loading branch information
emccorson committed Jul 19, 2023
1 parent cfa2f5e commit a06a331
Show file tree
Hide file tree
Showing 171 changed files with 482 additions and 484 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ for solving possible issue see [Troubleshooting](#troubleshooting)

## Introduction

This is the main app of the project and it is the user interface of the application. It is based on create-react-app and uses TypeScript. Some of its' functionality is split to external project living in this repository, under the directory `packages`. They are: [anoma-lib](#anoma-lib), [key-management](#key-management), [masp-web](#masp-web). All of those dependencies use Rust code that is compiled to WASM with [bindgen](https://rustwasm.github.io/wasm-bindgen). Anoma-wallet and its developers do not have to care about this fact, except when compiling the dependencies in the beginning. All of the libraries using WASM exposes a usual TypeScript interface.

This is the `namada-interface` monorepo. Within it, you will find the code for the web wallet implementation. it contains the following packages:

```bash
Expand All @@ -49,14 +47,14 @@ namada-interface/
├── namada-interface/ # Main wallet React App
├── extension/ # Browser Extension React App
└── packages/
├── crypto/ # Crypto functions related to anoma extension and interface
├── crypto/ # Crypto functions related to namada extension and interface
├── integrations/ # Third-party wallet integrations
├── masp-web/ # utilities for performing MASP actions
├── rpc/ # Library for handling HTTP and WebSocket RPC calls
├── seed-management/ # Seed management library
├── session/ # Session management library
├── shared/ # Package for interfacing with `namada/shared`
├── tx/ # Library for interfacing with Anoma transactions
├── tx/ # Library for interfacing with Namada transactions
├── utils/ # Shared utilities
├── wallet/ # Library for deriving keys
└── wasm/ # Legacy wasm library
Expand Down
8 changes: 4 additions & 4 deletions apps/extension/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Anoma Browser Extension
# Namada Browser Extension

This is the Anoma Browser Extension project.
This is the Namada Browser Extension project.

## Usage

Expand Down Expand Up @@ -52,10 +52,10 @@ Once you have run `yarn build`, you can use the files in `./dist` to install the

1. In Firefox, navigate to `about:debugging#/runtime/this-firefox`
2. Select `Load Temporary Add-On...`
3. Navigate to either the `build/browser/manifest.json` or the `build/firefox/anoma_extension-0.1.0.zip` file to install
3. Navigate to either the `build/browser/manifest.json` or the `build/firefox/namada_extension-0.1.0.zip` file to install

The extension should be installed. Currently, this is enabled for `namada.me`, so navigating to that page will call the `content` scripts,
hopefully instantiating an instance of the `Anoma()` class API for handling communication between client and key store.
hopefully instantiating an instance of the `Namada()` class API for handling communication between client and key store.

## Notes

Expand Down
18 changes: 9 additions & 9 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@anoma/extension",
"name": "@namada/extension",
"version": "0.1.0",
"description": "Anoma Browser Extension",
"description": "Namada Browser Extension",
"repository": "https://github.com/anoma/namada-interface/",
"author": "Heliax Dev <[email protected]>",
"license": "MIT",
Expand All @@ -26,13 +26,13 @@
"wasm:build:dev": "./scripts/build.sh"
},
"dependencies": {
"@anoma/chains": "0.1.0",
"@anoma/components": "0.1.0",
"@anoma/crypto": "0.1.0",
"@anoma/shared": "0.1.0",
"@anoma/storage": "0.1.0",
"@anoma/types": "0.1.0",
"@anoma/utils": "0.1.0",
"@namada/chains": "0.1.0",
"@namada/components": "0.1.0",
"@namada/crypto": "0.1.0",
"@namada/shared": "0.1.0",
"@namada/storage": "0.1.0",
"@namada/types": "0.1.0",
"@namada/utils": "0.1.0",
"@cosmjs/encoding": "^0.29.0",
"@ledgerhq/hw-transport": "^6.28.3",
"@ledgerhq/hw-transport-webhid": "^6.27.14",
Expand Down
6 changes: 3 additions & 3 deletions apps/extension/src/App/Accounts/AccountListing.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useNavigate } from "react-router-dom";

import { Icon, IconName } from "@anoma/components";
import { AccountType, Bip44Path, DerivedAccount } from "@anoma/types";
import { shortenAddress } from "@anoma/utils";
import { Icon, IconName } from "@namada/components";
import { AccountType, Bip44Path, DerivedAccount } from "@namada/types";
import { shortenAddress } from "@namada/utils";

import { TopLevelRoute } from "App/types";
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/App/Accounts/Accounts.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { DerivedAccount } from "@anoma/types";
import { DerivedAccount } from "@namada/types";
import {
AccountsContainer,
AccountsList,
Expand Down
6 changes: 3 additions & 3 deletions apps/extension/src/App/Accounts/AddAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {
Input,
InputVariants,
Toggle,
} from "@anoma/components";
import { AccountType, DerivedAccount } from "@anoma/types";
import { chains, defaultChainId } from "@anoma/chains";
} from "@namada/components";
import { AccountType, DerivedAccount } from "@namada/types";
import { chains, defaultChainId } from "@namada/chains";

import { ExtensionRequester } from "extension";
import { Ports } from "router";
Expand Down
10 changes: 5 additions & 5 deletions apps/extension/src/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React, { useEffect, useState } from "react";
import { ThemeProvider } from "styled-components";
import { Routes, Route, useNavigate } from "react-router-dom";

import { DerivedAccount } from "@anoma/types";
import { getTheme } from "@anoma/utils";
import { Icon, IconName } from "@anoma/components";
import { useUntil } from "@anoma/hooks";
import { DerivedAccount } from "@namada/types";
import { getTheme } from "@namada/utils";
import { Icon, IconName } from "@namada/components";
import { useUntil } from "@namada/hooks";

import { Ports } from "router";
import {
Expand Down Expand Up @@ -188,7 +188,7 @@ export const App: React.FC = () => {
<GlobalStyles />
<ContentContainer>
<TopSection>
<Heading>Anoma Browser Extension</Heading>
<Heading>Namada Browser Extension</Heading>
<HeadingLoader
className={
maspStatus.status === Status.Pending ? "is-loading" : ""
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/App/LockWrapper/LockWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { useNavigate } from "react-router-dom";

import { Icon, IconName } from "@anoma/components";
import { Icon, IconName } from "@namada/components";
import { ButtonContainer, LockExtensionButton } from "./LockWrapper.components";
import { LockKeyRingMsg } from "background/keyring";
import { Ports } from "router";
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/App/Login/Login.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import { useNavigate } from "react-router-dom";

import { Button, ButtonVariant, Input, InputVariants } from "@anoma/components";
import { Button, ButtonVariant, Input, InputVariants } from "@namada/components";

import { TopLevelRoute } from "App/types";
import { ExtensionRequester } from "extension";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState } from "react";
import {
Button,
ButtonVariant
} from "@anoma/components";
} from "@namada/components";
import zxcvbn, { ZXCVBNFeedback } from "zxcvbn";

import {
Expand All @@ -17,7 +17,7 @@ import { DeleteAccountMsg } from "background/keyring";
import { ExtensionRequester } from "extension";
import { Ports } from "router";
import { DeleteAccountError } from "background/keyring/types";
import { assertNever } from "@anoma/utils";
import { assertNever } from "@namada/utils";

enum Status {
Unsubmitted,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertNever } from "@anoma/utils";
import { assertNever } from "@namada/utils";
import { ExtensionRequester } from "extension";

import { Mode, ExtraSetting } from "./types";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useState } from "react";
import {
Button,
ButtonVariant
} from "@anoma/components";
} from "@namada/components";
import zxcvbn, { ZXCVBNFeedback } from "zxcvbn";

import {
Expand All @@ -17,7 +17,7 @@ import { ResetPasswordMsg } from "background/keyring";
import { ExtensionRequester } from "extension";
import { Ports } from "router";
import { ResetPasswordError } from "background/keyring/types";
import { assertNever } from "@anoma/utils";
import { assertNever } from "@namada/utils";

enum Status {
Unsubmitted,
Expand Down
6 changes: 3 additions & 3 deletions apps/extension/src/App/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React, { useEffect, useState, useRef } from "react";
import { useNavigate } from "react-router-dom";
import browser from "webextension-polyfill";

import { DerivedAccount } from "@anoma/types";
import { Button, ButtonVariant } from "@anoma/components";
import { assertNever } from "@anoma/utils";
import { DerivedAccount } from "@namada/types";
import { Button, ButtonVariant } from "@namada/components";
import { assertNever } from "@namada/utils";

import { ExtensionRequester } from "extension";
import { Ports } from "router";
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/App/Setup/Setup.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { Button, ButtonVariant } from "@anoma/components";
import { Button, ButtonVariant } from "@namada/components";
import browser from "webextension-polyfill";

const Setup: React.FC = () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/Approvals/Approvals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from "react";
import { ThemeProvider } from "styled-components";
import { Routes, Route } from "react-router-dom";

import { getTheme } from "@anoma/utils";
import { getTheme } from "@namada/utils";

import {
AppContainer,
Expand Down Expand Up @@ -32,7 +32,7 @@ export const Approvals: React.FC = () => {
<GlobalStyles />
<ContentContainer>
<TopSection>
<Heading>Anoma Browser Extension</Heading>
<Heading>Namada Browser Extension</Heading>
</TopSection>
<Routes>
<Route
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, ButtonVariant } from "@anoma/components";
import { Button, ButtonVariant } from "@namada/components";
import { useQuery } from "hooks";

import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useNavigate } from "react-router-dom";
import { useEffect } from "react";

import { Button, ButtonVariant } from "@anoma/components";
import { shortenAddress } from "@anoma/utils";
import { Tokens } from "@anoma/types";
import { Button, ButtonVariant } from "@namada/components";
import { shortenAddress } from "@namada/utils";
import { Tokens } from "@namada/types";

import { useQuery } from "hooks";
import { Address } from "App/Accounts/AccountListing.components";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";

import { Button, ButtonVariant, Input, InputVariants } from "@anoma/components";
import { shortenAddress } from "@anoma/utils";
import { Button, ButtonVariant, Input, InputVariants } from "@namada/components";
import { shortenAddress } from "@namada/utils";

import { Status } from "Approvals/Approvals";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useNavigate, Outlet } from "react-router-dom";
import { AnimatePresence } from "framer-motion";
import { ThemeContext } from "styled-components";

import { Icon, IconName, IconSize } from "@anoma/components";
import { Icon, IconName, IconSize } from "@namada/components";
import {
TopSection,
TopSectionHeaderContainer,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react";

import { Button, ButtonVariant, Toggle } from "@anoma/components";
import { executeUntil } from "@anoma/utils";
import { Button, ButtonVariant, Toggle } from "@namada/components";
import { executeUntil } from "@namada/utils";

import { GenerateMnemonicMsg } from "background/keyring";
import { ExtensionRequester } from "extension";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
import { Button, ButtonVariant, Input, InputVariants } from "@anoma/components";
import { Button, ButtonVariant, Input, InputVariants } from "@namada/components";

import {
BodyText,
Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/Setup/Common/Completion/Completion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useState } from "react";
import { ExtensionRequester } from "extension";
import browser from "webextension-polyfill";

import { Button, ButtonVariant } from "@anoma/components";
import { useUntil } from "@anoma/hooks";
import { Button, ButtonVariant } from "@namada/components";
import { useUntil } from "@namada/hooks";
import {
CheckIsLockedMsg,
SaveMnemonicMsg,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from "styled-components";

/**
* TODO: Add onBlur callback to @anoma/components/Input to avoid
* TODO: Add onBlur callback to @namada/components/Input to avoid
* defining it below:
*/
export const Input = styled.input`
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/Setup/Common/Password/Password.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import zxcvbn from "zxcvbn";

import { Button, ButtonVariant } from "@anoma/components";
import { Button, ButtonVariant } from "@namada/components";

import {
BodyText,
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/Setup/ImportAccount/ImportAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useContext } from "react";
import { Outlet, useNavigate } from "react-router-dom";
import { ThemeContext } from "styled-components";

import { Icon, IconName, IconSize } from "@anoma/components";
import { Icon, IconName, IconSize } from "@namada/components";

import {
SubViewContainer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Input,
InputVariants,
Toggle,
} from "@anoma/components";
} from "@namada/components";

import { ExtensionRequester } from "extension";
import { ValidateMnemonicMsg } from "background/keyring";
Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/Setup/Ledger/Ledger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
IconSize,
Input,
InputVariants,
} from "@anoma/components";
import { shortenAddress } from "@anoma/utils";
} from "@namada/components";
import { shortenAddress } from "@namada/utils";

import { initLedgerHIDTransport, Ledger as LedgerApp } from "background/ledger";
import { ExtensionRequester } from "extension";
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/Setup/Setup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from "react";
import { Routes, Route, useNavigate } from "react-router-dom";
import { ThemeProvider } from "styled-components";

import { formatRouterPath, getTheme } from "@anoma/utils";
import { formatRouterPath, getTheme } from "@namada/utils";

import { AccountCreation } from "./AccountCreation";
import {
Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/Setup/Start/Start.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import { useNavigate } from "react-router-dom";

import { Button, ButtonVariant } from "@anoma/components";
import { formatRouterPath } from "@anoma/utils";
import { Button, ButtonVariant } from "@namada/components";
import { formatRouterPath } from "@namada/utils";

import {
BodyText,
Expand Down
4 changes: 2 additions & 2 deletions apps/extension/src/background/approvals/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { fromBase64 } from "@cosmjs/encoding";
import { v4 as uuid } from "uuid";
import BigNumber from "bignumber.js";

import { TransferMsgValue } from "@anoma/types";
import { KVStore } from "@anoma/storage";
import { TransferMsgValue } from "@namada/types";
import { KVStore } from "@namada/storage";

import { ExtensionRequester } from "extension";
import { KeyRingService } from "background/keyring";
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/background/chains/handler.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Chain } from "@anoma/types";
import { Chain } from "@namada/types";
import { Handler, Env, Message, InternalHandler } from "router";
import { ChainsService } from "./service";
import { RemoveChainMsg } from "./messages";
Expand Down
2 changes: 1 addition & 1 deletion apps/extension/src/background/chains/messages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Chain } from "@anoma/types";
import { Chain } from "@namada/types";
import { Message } from "router";
import { ROUTE } from "./constants";

Expand Down
6 changes: 3 additions & 3 deletions apps/extension/src/background/chains/service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { KVStore } from "@anoma/storage";
import { debounce } from "@anoma/utils";
import { Chain } from "@anoma/types";
import { KVStore } from "@namada/storage";
import { debounce } from "@namada/utils";
import { Chain } from "@namada/types";
import { Env, KVKeys } from "router";

type ChainRemovedHandler = (chainId: string, identifier: string) => void;
Expand Down
Loading

0 comments on commit a06a331

Please sign in to comment.