Skip to content

Commit

Permalink
Fix the unit measurement
Browse files Browse the repository at this point in the history
  • Loading branch information
BTCgreen-Network committed Jan 28, 2023
1 parent 21ad1e4 commit 74e65f9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function useNFTMetadata({ id }: { walletId: number; id: string })
description:
"Mocked NFT description Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
image: `https://picsum.photos/800/800?random=${id}`,
price: Math.floor(Math.random() * 100) * 10 ** 12,
price: Math.floor(Math.random() * 100) * 10 ** 3,
total: Math.floor(Math.random() * 10000),
marketplace: 'NFT Marketplace',
hash: randomBytes(32).toString('hex'),
Expand All @@ -22,21 +22,21 @@ export default function useNFTMetadata({ id }: { walletId: number; id: string })
type: 'transfer',
from: '@Anderson',
to: '@DrSpaceman',
amount: Math.floor(Math.random() * 100) * 10 ** 12,
amount: Math.floor(Math.random() * 100) * 10 ** 3,
},
{
date: new Date() - Math.floor(Math.random() * 100) * 24 * 60 * 60 * 1000,
type: 'transfer',
from: '@Smith',
to: '@Anderson',
amount: Math.floor(Math.random() * 100) * 10 ** 12,
amount: Math.floor(Math.random() * 100) * 10 ** 3,
},
{
date: new Date() - Math.floor(Math.random() * 100) * 24 * 60 * 60 * 1000,
type: 'transfer',
from: '@PeterParker',
to: '@Smith',
amount: Math.floor(Math.random() * 100) * 10 ** 12,
amount: Math.floor(Math.random() * 100) * 10 ** 3,
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Unit from './Unit';

const UnitValue = {
[Unit.SHIBGREEN]: 1,
[Unit.MOJO]: 1 / 1e12,
[Unit.MOJO]: 1 / 1e3,
[Unit.CAT]: 1 / 1e9,
};

Expand Down
2 changes: 1 addition & 1 deletion shibgreen-blockchain-gui/packages/gui/src/util/units.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const units = {
shibgreen: 1,
mojo: 1 / 1e12,
mojo: 1 / 1e3,
colouredcoin: 1 / 1e9,
};

Expand Down
2 changes: 1 addition & 1 deletion shibgreen/cmds/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# The rest of the codebase uses mojos everywhere.
# Only use these units for user facing interfaces.
units: Dict[str, int] = {
"shibgreen": 10**12, # 1 shibgreen (XSHIB) is 1,000,000,000,000 mojo (1 trillion)
"shibgreen": 10**3, # 1 shibgreen (XSHIB) is 1,000,000,000,000 mojo (1 trillion)
"mojo": 1,
"cat": 10**3, # 1 CAT is 1000 CAT mojos
}

0 comments on commit 74e65f9

Please sign in to comment.