@@ -4,6 +4,7 @@ import { pour } from 'sigil-js'
4import * as ob from 'urbit-ob'
4import * as ob from 'urbit-ob'
5import * as azimuth from 'azimuth-js'
5import * as azimuth from 'azimuth-js'
7+import { randomPatq } from '../lib/lib'
7import { ROUTE_NAMES } from '../lib/router'
8import { ROUTE_NAMES } from '../lib/router'
9import { InnerLabel, TicketInput } from '../components/Base'
10import { InnerLabel, TicketInput } from '../components/Base'
@@ -13,16 +14,6 @@ import Actions from './Point/Actions'
13import { BRIDGE_ERROR } from '../lib/error'
14import { BRIDGE_ERROR } from '../lib/error'
14import { Row, Col, Warning, Button, H1, H3 } from '../components/Base'
15import { Row, Col, Warning, Button, H1, H3 } from '../components/Base'
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'),
23− return ob.hex2patq(hex)
26class InviteVerify extends React.Component {
17class InviteVerify extends React.Component {
28 constructor(props) {
19 constructor(props) {
@@ -33,7 +24,7 @@ class InviteVerify extends React.Component {
33 realTicket: this.props.routeData.ticket
24 realTicket: this.props.routeData.ticket
36− this.ticketPlaceholder = placeholder(8);
27+ this.ticketPlaceholder = randomPatq(8);
37 this.handleTicketInput = this.handleTicketInput.bind(this);
28 this.handleTicketInput = this.handleTicketInput.bind(this);
38 this.proceed = this.proceed.bind(this);
29 this.proceed = this.proceed.bind(this);