-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1664 from bithyve/dev
build 103
- Loading branch information
Showing
19 changed files
with
311 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
import config from 'src/core/config' | ||
import { NetworkType } from 'src/core/wallets/enums' | ||
import config from 'src/core/config'; | ||
import { NetworkType } from 'src/core/wallets/enums'; | ||
|
||
export const SATOSHIS_IN_BTC = 1e8 | ||
export const SATOSHIS_IN_BTC = 1e8; | ||
|
||
export const getAmount = (amountInSats: number) => { | ||
if (config.NETWORK_TYPE === NetworkType.MAINNET) { | ||
return (amountInSats / SATOSHIS_IN_BTC).toFixed(4); | ||
} | ||
return amountInSats; | ||
|
||
} | ||
} | ||
return amountInSats; | ||
}; | ||
export const getUnit = () => { | ||
if (config.NETWORK_TYPE === NetworkType.MAINNET) { | ||
return ''; | ||
} | ||
return 'sats'; | ||
|
||
} | ||
} | ||
return 'sats'; | ||
}; | ||
|
||
export const isTestnet = () => { | ||
if (config.NETWORK_TYPE === NetworkType.TESTNET) { | ||
return true; | ||
} | ||
return false; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import { Box } from 'native-base'; | ||
|
||
import Text from 'src/components/KeeperText'; | ||
import { StyleSheet } from 'react-native'; | ||
|
||
function TestnetIndicator() { | ||
return ( | ||
<Box | ||
backgroundColor={'light.white'} | ||
style={styles.container} | ||
> | ||
<Text | ||
color="light.primaryGreen" | ||
bold | ||
style={styles.text}> | ||
TESTNET | ||
</Text> | ||
</Box> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
borderRadius: 99, | ||
paddingHorizontal: 8, | ||
height: 20 | ||
}, | ||
text: { | ||
fontSize: 12, | ||
letterSpacing: 0.9 | ||
} | ||
}) | ||
|
||
export default TestnetIndicator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.