Skip to content

Commit

Permalink
Merge pull request #15 from B3Pay/update
Browse files Browse the repository at this point in the history
Redesign install page & Fix bugs
  • Loading branch information
b3hr4d authored Jul 13, 2023
2 parents 79d0771 + b84399a commit 29bcf86
Show file tree
Hide file tree
Showing 15 changed files with 402 additions and 246 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion backend/b3_wallet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "b3_wallet"
version = "0.0.0-alpha.32"
version = "0.0.0-alpha.33"
edition = "2021"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion backend/lib/b3_helper_lib/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub const RATE_LIMIT: u64 = NanoTimeStamp::NS_PER_MINUTE;

pub const IC_TRANSACTION_FEE_ICP: Tokens = Tokens::from_e8s(10_000);

pub const CREATE_WALLET_CANISTER_CYCLES: u128 = 100_000_000_000;
pub const CREATE_WALLET_CANISTER_CYCLES: u128 = 200_000_000_000;

pub const CANISTER_CREATE_MEMO: Memo = Memo(0x41455243);

Expand Down
2 changes: 1 addition & 1 deletion backend/lib/b3_helper_lib/src/subaccount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Subaccount {
}

if self.is_default() {
return "default".to_string();
return "-default".to_string();
}

let env_str = match self.0[23] {
Expand Down
2 changes: 1 addition & 1 deletion backend/lib/b3_wallet_lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "b3_wallet_lib"
version = "0.1.32"
version = "0.1.33"
edition = "2021"
description = "This is wallet library for the B3Wallet project."
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion backend/lib/b3_wallet_lib/src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl Default for WalletAccount {
impl From<Subaccount> for WalletAccount {
fn from(subaccount: Subaccount) -> Self {
let id = subaccount.id();
let ledger = Ledger::from(subaccount.clone());
let ledger = Ledger::from(subaccount);

WalletAccount {
id,
Expand Down
4 changes: 2 additions & 2 deletions backend/lib/b3_wallet_lib/src/ledger/subaccount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ mod tests {
assert_eq!(subaccount.environment(), Environment::Production);
assert_eq!(subaccount.nonce(), 0);
assert_eq!(subaccount.name(), "Default");
assert_eq!(subaccount.id(), "default");
assert_eq!(subaccount.id(), "-default");

let identifier = subaccount.account_identifier(TEST_PRINCIPAL);

Expand Down Expand Up @@ -146,7 +146,7 @@ mod tests {
0, 0, 0, 0
]]
);
assert_eq!(subaccount.id(), "default");
assert_eq!(subaccount.id(), "-default");
assert_eq!(subaccount.name(), "Default");

let subaccount = Subaccount::new(Environment::Production, 1);
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "b3wallet-frontend",
"version": "0.4.6",
"version": "0.4.8",
"author": "b3hr4d",
"description": "Wallet and System Canister for the B3Wallet on the Internet Computer",
"keywords": [
Expand Down
60 changes: 9 additions & 51 deletions frontend/public/wasm/releases.json
Original file line number Diff line number Diff line change
@@ -1,72 +1,30 @@
[
{
"url": "wasm/b3_wallet/0.0.0-alpha.32/b3_wallet.wasm",
"url": "wasm/b3_wallet/0.0.0-alpha.33/b3_wallet.wasm",
"name": "b3_wallet",
"size": 3388309,
"size": 3391687,
"wasmFile": "b3_wallet.wasm",
"version": "0.0.0-alpha.32"
"version": "0.0.0-alpha.33"
},
{
"url": "wasm/b3_wallet/0.0.0-alpha.32/b3_wallet_candid.wasm",
"url": "wasm/b3_wallet/0.0.0-alpha.33/b3_wallet_candid.wasm",
"name": "b3_wallet",
"size": 3911529,
"size": 3915023,
"wasmFile": "b3_wallet_candid.wasm",
"version": "0.0.0-alpha.32"
},
{
"url": "wasm/b3_wallet/0.0.0-alpha.31/b3_wallet.wasm",
"name": "b3_wallet",
"size": 3388951,
"wasmFile": "b3_wallet.wasm",
"version": "0.0.0-alpha.31"
},
{
"url": "wasm/b3_wallet/0.0.0-alpha.31/b3_wallet_candid.wasm",
"name": "b3_wallet",
"size": 3910805,
"wasmFile": "b3_wallet_candid.wasm",
"version": "0.0.0-alpha.31"
},
{
"url": "wasm/b3_wallet/0.0.0-alpha.30/b3_wallet.wasm",
"name": "b3_wallet",
"size": 3391053,
"wasmFile": "b3_wallet.wasm",
"version": "0.0.0-alpha.30"
},
{
"url": "wasm/b3_wallet/0.0.0-alpha.30/b3_wallet_candid.wasm",
"name": "b3_wallet",
"size": 3908178,
"wasmFile": "b3_wallet_candid.wasm",
"version": "0.0.0-alpha.30"
"version": "0.0.0-alpha.33"
},
{
"url": "wasm/b3_basic_wallet/0.0.0-alpha.17/b3_basic_wallet.wasm",
"name": "b3_basic_wallet",
"size": 2427073,
"size": 2427889,
"wasmFile": "b3_basic_wallet.wasm",
"version": "0.0.0-alpha.17"
},
{
"url": "wasm/b3_basic_wallet/0.0.0-alpha.17/b3_basic_wallet_candid.wasm",
"name": "b3_basic_wallet",
"size": 2772610,
"size": 2773601,
"wasmFile": "b3_basic_wallet_candid.wasm",
"version": "0.0.0-alpha.17"
},
{
"url": "wasm/b3_basic_wallet/0.0.0-alpha.16/b3_basic_wallet.wasm",
"name": "b3_basic_wallet",
"size": 2425171,
"wasmFile": "b3_basic_wallet.wasm",
"version": "0.0.0-alpha.16"
},
{
"url": "wasm/b3_basic_wallet/0.0.0-alpha.16/b3_basic_wallet_candid.wasm",
"name": "b3_basic_wallet",
"size": 2770969,
"wasmFile": "b3_basic_wallet_candid.wasm",
"version": "0.0.0-alpha.16"
}
]
]
86 changes: 55 additions & 31 deletions frontend/src/components/Disclaimer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,66 @@ import { Alert, AlertIcon, Heading, Stack, Text } from "@chakra-ui/react"

interface DisclaimerProps {
noTitle?: boolean
asCard?: boolean
}

const Disclaimer: React.FC<DisclaimerProps> = ({ noTitle }) => {
const Disclaimer: React.FC<DisclaimerProps> = ({
noTitle,
asCard: withCard
}) => {
return (
<Stack>
<Heading as="h3" fontSize="2xl" marginBottom="10px" hidden={noTitle}>
<Stack
backgroundColor={withCard ? "white" : "transparent"}
marginTop={withCard ? 2 : 0}
borderRadius={withCard ? "md" : 0}
padding={0}
spacing={0}
>
<Heading
as="h3"
fontSize="2xl"
marginBottom="10px"
hidden={noTitle}
padding={2}
mb={2}
alignItems="center"
alignContent="center"
borderBottom="1px solid"
borderColor="gray.200"
>
Disclaimer
</Heading>
<Alert status="warning" marginBottom="10px">
<AlertIcon />
<Text>
The B3Wallet web wallet is currently in an alpha version and is not
yet fully tested or audited. Use of this wallet is at your own risk.
We recommend using this wallet only with testnet tokens
</Text>
</Alert>
<Alert status="warning" marginBottom="10px">
<AlertIcon />
<Text>
B3Wallet and its developers make no warranty or representation, either
express or implied, with respect to the software, including its
quality, performance, merchantability, or fitness for a particular
purpose. In no event will B3Wallet or its developers be liable for any
direct, indirect, consequential, incidental, special, or exemplary
damages, including but not limited to lost profits, lost savings, or
lost data, arising out of the use or inability to use this software.
</Text>
</Alert>
<Alert status="warning">
<AlertIcon />
<Text>
By using B3Wallet, you agree to these terms and assume all risks
associated with your use of the wallet. Please be safe and exercise
caution when dealing with cryptocurrencies.
</Text>
</Alert>
<Stack padding={2} spacing={2}>
<Alert status="warning" marginBottom="10px">
<AlertIcon />
<Text>
The B3Wallet web wallet is currently in an alpha version and is not
yet fully tested or audited. Use of this wallet is at your own risk.
We recommend using this wallet only with testnet tokens
</Text>
</Alert>
<Alert status="warning" marginBottom="10px">
<AlertIcon />
<Text>
B3Wallet and its developers make no warranty or representation,
either express or implied, with respect to the software, including
its quality, performance, merchantability, or fitness for a
particular purpose. In no event will B3Wallet or its developers be
liable for any direct, indirect, consequential, incidental, special,
or exemplary damages, including but not limited to lost profits,
lost savings, or lost data, arising out of the use or inability to
use this software.
</Text>
</Alert>
<Alert status="warning">
<AlertIcon />
<Text>
By using B3Wallet, you agree to these terms and assume all risks
associated with your use of the wallet. Please be safe and exercise
caution when dealing with cryptocurrencies.
</Text>
</Alert>
</Stack>
</Stack>
)
}
Expand Down
Loading

0 comments on commit 29bcf86

Please sign in to comment.