-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bugfix: tx details (#854) * Fix progress bar (#857) * fix progress bar * fix snapshots * improvement: performance (#858) * update gemfile.lock (#859) * fix sourcemaps dir (#860) * fix (#861) * Bugfix: typed sign v3 (#853) * handle gaba changes * bunmp gaba * lock gaba * fix crash (#863) * fix ens stuff (#865) * Improvement: switch account and network performance (#864) * move account elemnt to its own component * an accountchange * avoid calling getaccounts on render * update when there is actually a change * accountlist * fix delete * requestAnimationFrame on network change * minor wallet improvements * snaps * Add payment channels logs (#866) * add payment channels logs * more logs * fix typo * add license and infos (#868) * fix import wallet view (#869) * bugfix: collectibles empty details (#870) * Bump and disclaimer (#871) * add disclaimer on payment channels * version bump * fix payment channels view in small devices * rollback minimagic (#873)
- Loading branch information
1 parent
c0c6fce
commit 61334e8
Showing
151 changed files
with
757 additions
and
715 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
![MetaMask logo](logo.png?raw=true) | ||
# MetaMask | ||
# MetaMask | ||
MetaMask is a mobile web browser that provides easy access to websites that use the [Ethereum](https://ethereum.org/) blockchain. | ||
|
||
For up to the minute news, follow our [Twitter](https://twitter.com/metamask_io) or [Medium](https://medium.com/metamask) pages. | ||
|
||
To learn how to develop MetaMask-compatible applications, visit our [Developer Docs](https://metamask.github.io/metamask-docs/). | ||
|
||
## MetaMask Mobile | ||
## MetaMask Mobile | ||
|
||
### Building locally | ||
### Building locally | ||
The code is built using React-Native and running code locally requires a Mac or Linux OS. | ||
|
||
- Install [Node.js](https://nodejs.org) **version 8 (latest stable) and npm@6** | ||
|
@@ -17,7 +17,7 @@ The code is built using React-Native and running code locally requires a Mac or | |
- Install npm@6 using `npm install -g npm@6` | ||
|
||
- Before starting, you need to install React Native dependencies: | ||
- [MacOs](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-1) | ||
- [MacOs](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-1) | ||
- [Linux](https://facebook.github.io/react-native/docs/getting-started.html#installing-dependencies-2) | ||
- Now clone this repo and then install all our dependencies | ||
|
||
|
@@ -26,7 +26,7 @@ cd MetaMask | |
npm i | ||
``` | ||
|
||
- Running the app on Android: | ||
- Running the app on Android: | ||
|
||
```bash | ||
npm run start:android | ||
|
@@ -39,24 +39,29 @@ npm run start:ios | |
``` | ||
|
||
### Running tests: | ||
- Unit test: | ||
- Unit test: | ||
``` | ||
npm run test:unit | ||
``` | ||
``` | ||
- E2E Tests (iOS) | ||
``` | ||
npm run test:e2e:ios | ||
``` | ||
``` | ||
- E2E Tests (Android) | ||
``` | ||
npm run test:e2e:android | ||
``` | ||
``` | ||
|
||
|
||
### Troubleshooting | ||
### Troubleshooting | ||
|
||
Visit [Troubleshooting for React Native](https://facebook.github.io/react-native/docs/troubleshooting#content) | ||
|
||
## License | ||
|
||
To be defined... | ||
MetaMask Mobile is an exciting development for our team and our ecosystem. We've always been proud to offer the MetaMask browser extension under the MIT open source software license. We are still working through licensing considerations for the mobile application in light of a new delivery medium and our business goals. We are exploring many models, all with a significant open component, but we have not made any final decisions. | ||
|
||
The source code for this beta is currently viewable under the below copyright. A license to use the mobile version will be distributed along with the mobile application. We believe it is important for our users to be able inspect and verify our code for trustworthiness, but we also wish to preserve our licensing options until we're certain what is best for MetaMask, our community, and our ecosystem. If you have any questions or comments, we would really appreciate hearing your feedback – you can reach us at [email protected] | ||
|
||
© ConsenSys AG, 2016-2019 | ||
|
||
You are granted a limited non-exclusive license to inspect and study the code in this repository. There is no associated right to reproduction granted under this license except where reproduction is necessary for inspection and study of the code. You may not otherwise reproduce, distribute, modify or create derivative works of the code without our prior consent. All other rights are expressly reserved. |
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
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,130 @@ | ||
import React, { PureComponent } from 'react'; | ||
import Identicon from '../../Identicon'; | ||
import PropTypes from 'prop-types'; | ||
import { TouchableOpacity, StyleSheet, Text, View } from 'react-native'; | ||
import { colors, fontStyles } from '../../../../styles/common'; | ||
import { renderFromWei } from '../../../../util/number'; | ||
import { getTicker } from '../../../../util/transactions'; | ||
import { strings } from '../../../../../locales/i18n'; | ||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; | ||
|
||
const styles = StyleSheet.create({ | ||
account: { | ||
borderBottomWidth: StyleSheet.hairlineWidth, | ||
borderColor: colors.grey100, | ||
flexDirection: 'row', | ||
paddingHorizontal: 20, | ||
paddingVertical: 20, | ||
height: 80 | ||
}, | ||
accountInfo: { | ||
marginLeft: 15, | ||
marginRight: 0, | ||
flex: 1, | ||
flexDirection: 'row' | ||
}, | ||
accountLabel: { | ||
fontSize: 18, | ||
color: colors.fontPrimary, | ||
...fontStyles.normal | ||
}, | ||
accountBalance: { | ||
paddingTop: 5, | ||
fontSize: 12, | ||
color: colors.fontSecondary, | ||
...fontStyles.normal | ||
}, | ||
importedView: { | ||
flex: 0.5, | ||
alignItems: 'center', | ||
marginTop: 2 | ||
}, | ||
accountMain: { | ||
flex: 1, | ||
flexDirection: 'column' | ||
}, | ||
selectedWrapper: { | ||
flex: 0.2, | ||
alignItems: 'flex-end' | ||
}, | ||
importedText: { | ||
color: colors.grey400, | ||
fontSize: 10, | ||
...fontStyles.bold | ||
}, | ||
importedWrapper: { | ||
width: 73, | ||
paddingHorizontal: 10, | ||
paddingVertical: 3, | ||
borderRadius: 10, | ||
borderWidth: 1, | ||
borderColor: colors.grey400 | ||
} | ||
}); | ||
|
||
/** | ||
* View that renders specific account element in AccountList | ||
*/ | ||
export default class AccountElement extends PureComponent { | ||
static propTypes = { | ||
/** | ||
* Callback to be called onPress | ||
*/ | ||
onPress: PropTypes.func.isRequired, | ||
/** | ||
* Callback to be called onLongPress | ||
*/ | ||
onLongPress: PropTypes.func.isRequired, | ||
/** | ||
* Current ticker | ||
*/ | ||
ticker: PropTypes.string, | ||
item: PropTypes.object | ||
}; | ||
|
||
onPress = () => { | ||
const { onPress } = this.props; | ||
const { index } = this.props.item; | ||
onPress && onPress(index); | ||
}; | ||
|
||
onLongPress = () => { | ||
const { onLongPress } = this.props; | ||
const { address, isImported, index } = this.props.item; | ||
onLongPress && onLongPress(address, isImported, index); | ||
}; | ||
|
||
render() { | ||
const { address, balance, ticker, name, isSelected, isImported } = this.props.item; | ||
const selected = isSelected ? <Icon name="check-circle" size={30} color={colors.blue} /> : null; | ||
const imported = isImported ? ( | ||
<View style={styles.importedWrapper}> | ||
<Text numberOfLines={1} style={styles.importedText}> | ||
{strings('accounts.imported')} | ||
</Text> | ||
</View> | ||
) : null; | ||
return ( | ||
<TouchableOpacity | ||
style={styles.account} | ||
key={`account-${address}`} | ||
onPress={this.onPress} | ||
onLongPress={this.onLongPress} | ||
> | ||
<Identicon address={address} diameter={38} /> | ||
<View style={styles.accountInfo}> | ||
<View style={styles.accountMain}> | ||
<Text numberOfLines={1} style={[styles.accountLabel]}> | ||
{name} | ||
</Text> | ||
<Text style={styles.accountBalance}> | ||
{renderFromWei(balance)} {getTicker(ticker)} | ||
</Text> | ||
</View> | ||
{imported && <View style={styles.importedView}>{imported}</View>} | ||
<View style={styles.selectedWrapper}>{selected}</View> | ||
</View> | ||
</TouchableOpacity> | ||
); | ||
} | ||
} |
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.