Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: collectibles original image #642

Merged
merged 3 commits into from
May 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion app/components/UI/AddCustomCollectible/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ class AddCustomCollectible extends Component {
/**
* A string that represents the selected address
*/
selectedAddress: PropTypes.string
selectedAddress: PropTypes.string,
/**
* Collectible contract object of collectible to add
*/
collectibleContract: PropTypes.object
};

componentDidMount = () => {
Expand All @@ -59,6 +63,8 @@ class AddCustomCollectible extends Component {
setTimeout(() => {
this.mounted && this.setState({ inputWidth: '100%' });
}, 100);
const { collectibleContract } = this.props;
collectibleContract && this.setState({ address: collectibleContract.address });
};

componentWillUnmount = () => {
Expand Down
3 changes: 2 additions & 1 deletion app/components/UI/CollectibleContractOverview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ class CollectibleContractOverview extends Component {
};

onAdd = () => {
this.props.navigation.push('AddAsset', { assetType: 'collectible' });
const { navigation, collectibleContract } = this.props;
navigation.push('AddAsset', { assetType: 'collectible', collectibleContract });
};

onSend = () => {
Expand Down
8 changes: 6 additions & 2 deletions app/components/Views/AddAsset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class AddAsset extends Component {
const {
navigation: {
state: {
params: { assetType }
params: { assetType, collectibleContract }
}
},
navigation
Expand All @@ -86,7 +86,11 @@ export default class AddAsset extends Component {
/>
</ScrollableTabView>
) : (
<AddCustomCollectible navigation={navigation} testID={'add-custom-collectible'} />
<AddCustomCollectible
navigation={navigation}
collectibleContract={collectibleContract}
testID={'add-custom-collectible'}
/>
)}
</SafeAreaView>
);
Expand Down
Loading