Skip to content

Commit

Permalink
Adding QRCODE in Profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Sukumar-Abhijeet committed Nov 18, 2020
1 parent 30c33bf commit fd6edc2
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 7 deletions.
Binary file modified android/.gradle/6.0.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified android/.gradle/6.0.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified android/.gradle/6.0.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified android/.gradle/6.0.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified android/.gradle/6.0.1/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified android/.gradle/6.0.1/javaCompile/classAnalysis.bin
Binary file not shown.
Binary file modified android/.gradle/6.0.1/javaCompile/jarAnalysis.bin
Binary file not shown.
Binary file modified android/.gradle/6.0.1/javaCompile/javaCompile.lock
Binary file not shown.
Binary file modified android/.gradle/6.0.1/javaCompile/taskHistory.bin
Binary file not shown.
Binary file modified android/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified android/.gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"react-native-textinput-effects": "^0.6.1",
"react-native-unimodules": "^0.9.0",
"react-native-vector-icons": "^7.1.0",
"react-native-webview": "^10.10.2",
"react-redux": "^7.2.1",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
Expand Down
9 changes: 5 additions & 4 deletions src/@Screens/Tabs/Accounts/Details/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
*/

import React,{useEffect, useState} from 'react';
import {View,Text,TouchableOpacity,Share,WebView} from 'react-native';
import {View,Text,TouchableOpacity,Share} from 'react-native';
import { WebView } from 'react-native-webview';
import styles from '../styles';
import WalletService from '../../../../@Services/wallet-service';
import walletUtils from '../../../../@Services/wallet-utils';
Expand All @@ -42,9 +43,9 @@ const Details = () =>{
useEffect(()=>{generateQR();},[]);

const generateQR = async() => {
let svg = await QRCode.toString(accAddress,{type:'svg'});
let svg = await QRCode.toString(accAddress,{type:'terminal'});
setQrSvg(svg);
console.log(svg);
console.log('terminal',svg);

// QRCode.toDataURL(accAddress)
// .then(url => {
Expand Down Expand Up @@ -85,7 +86,7 @@ const Details = () =>{
{(!qrSvg) && <Text>Preparing...</Text>}
{
(qrSvg) &&
<WebView source={{uri:qrSvg}} />
<WebView source={{ html: qrSvg }} style={{width:moderateScale(250),height:250,}} />
}
</View>
<TouchableOpacity onPress={()=>copyToClipboard()}>
Expand Down
5 changes: 3 additions & 2 deletions src/@Screens/Tabs/Accounts/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default (styles = StyleSheet.create({
alignSelf:'center',
width:moderateScale(250),
height:moderateScale(250),
backgroundColor:Colors.black,
backgroundColor:Colors.white,
shadowOpacity: .2,
shadowRadius: moderateScale(5),
shadowOffset: {
Expand All @@ -122,7 +122,8 @@ export default (styles = StyleSheet.create({
marginTop:moderateScale(30),
justifyContent:'center',
alignItems:'center',
borderRadius:moderateScale(30)
borderRadius:moderateScale(30),
overflow:'hidden'
},
shareButton:{
backgroundColor:Colors.activeTintRed,
Expand Down
15 changes: 14 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4410,6 +4410,11 @@ escape-html@~1.0.3:
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=

escape-string-regexp@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344"
integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==

escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
Expand Down Expand Up @@ -5768,7 +5773,7 @@ internal-slot@^1.0.2:
has "^1.0.3"
side-channel "^1.0.2"

invariant@^2.2.2, invariant@^2.2.4:
invariant@2.2.4, invariant@^2.2.2, invariant@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
Expand Down Expand Up @@ -8707,6 +8712,14 @@ react-native-vector-icons@^7.1.0:
prop-types "^15.7.2"
yargs "^15.0.2"

react-native-webview@^10.10.2:
version "10.10.2"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-10.10.2.tgz#13208aef17c9ccfd28355363688f4cbe2143f10a"
integrity sha512-98Dh7q1gEflicFZ8KNL3nK5XRjx50OZXqw87jHofVjKfjbK0LKmvI5X8ymgUMGg61JVgI3AF+g8qpDvqjgQsfg==
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"

react-native@0.62.3:
version "0.63.3"
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.63.3.tgz#4a7f6540e049ff41810887bbd1125abc4672f3bf"
Expand Down

0 comments on commit fd6edc2

Please sign in to comment.