@@ -4,6 +4,7 @@ import { pour } from 'sigil-js'
44import * as ob from 'urbit-ob'
55import * as azimuth from 'azimuth-js'
66
7+import { randomPatq } from '../lib/lib'
78import { ROUTE_NAMES } from '../lib/router'
89
910import { InnerLabel, TicketInput } from '../components/Base'
@@ -13,16 +14,6 @@ import Actions from './Point/Actions'
1314import { BRIDGE_ERROR } from '../lib/error'
1415import { Row, Col, Warning, Button, H1, H3 } from '../components/Base'
1516
16−//TODO from Ticket.js, move to lib
17−const placeholder = (len) => {
18− let bytes = window.crypto.getRandomValues(new Uint8Array(len))
19− let hex = bytes.reduce((acc, byt) =>
20− acc + byt.toString(16).padStart(2, '0'),
21− ''
22− )
23− return ob.hex2patq(hex)
24−}
25−
2617class InviteVerify extends React.Component {
2718
2819 constructor(props) {
@@ -33,7 +24,7 @@ class InviteVerify extends React.Component {
3324 realTicket: this.props.routeData.ticket
3425 }
3526
36− this.ticketPlaceholder = placeholder(8);
27+ this.ticketPlaceholder = randomPatq(8);
3728 this.handleTicketInput = this.handleTicketInput.bind(this);
3829 this.proceed = this.proceed.bind(this);
3930 }