Skip to content

Commit

Permalink
fix app crash on wallet address request
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolay.natorin committed Dec 2, 2020
1 parent fe8adc1 commit a3ae00c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/screens/ChatScreen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,16 @@ const ChatScreen = ({
text: 'Yes',
onPress: () => {
const { privateKey } = fromWif(addressWif, testnet);
const signedMessage = signMessage(params.messageToSign, { testnet, privateKey });
const signedMessage = signMessage(data.messageToSign, { testnet, privateKey });
const message = Buffer.from(JSON.stringify(signedMessage)).toString('base64');
onSend([{ text: `[Signed message](signed-message:${message})` }]);
},
},
]);
}}
>{`\"${messageToSign}\"`}</TouchableOpacity>
>
<Text style={replacedStyle}>{`\"${messageToSign}\"`}</Text>
</TouchableOpacity>
</Fragment>
)
: <Text style={style}>{`Request to sign message: \"${messageToSign}\"`}</Text>
Expand Down

0 comments on commit a3ae00c

Please sign in to comment.