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

add passthrough code #436

Merged
merged 2 commits into from
Aug 28, 2023
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: 4 additions & 4 deletions src/features/burn/BurnScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ const BurnScreen = () => {
const dcBalance = useBN(useOwnedAmount(wallet, DC_MINT).amount)
const { showOKAlert } = useAlert()
const hntKeyboardRef = useRef<HNTKeyboardRef>(null)
const [dcAmount, setDcAmount] = useState(new BN(route.params.amount))
const [submitError, setSubmitError] = useState<string | undefined>(undefined)
const [dcAmount, setDcAmount] = useState(new BN(route.params.amount || 0))
const [delegateAddress, setDelegateAddress] = useState(route.params.address)
const [memo, setMemo] = useState(route.params.memo)
const [mint, setMint] = useState<PublicKey>(
(route.params.mint && new PublicKey(route.params.mint)) || MOBILE_MINT,
)
const [submitError, setSubmitError] = useState<string | undefined>(undefined)
const [memo, setMemo] = useState(route.params.memo)
const [hasError, setHasError] = useState(false)
const delegatePayment = useSelector(
(reduxState: RootState) => reduxState.solana.delegate,
Expand All @@ -123,7 +123,7 @@ const BurnScreen = () => {
}, [networkType])

const amountBalance = useMemo(() => {
const amount = new BN(route.params.amount)
const amount = new BN(route.params.amount || 0)

if (dcAmount) return dcAmount

Expand Down
2 changes: 1 addition & 1 deletion src/features/home/homeTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type PaymentRouteParam = {

export type BurnRouteParam = {
address: string
amount: string
amount?: string
memo?: string
isDelegate?: boolean
mint?: string
Expand Down
1 change: 1 addition & 0 deletions src/features/payment/PaymentQrScanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const PaymentQrScanner = () => {
address: delegate.address,
amount: delegate.amount,
memo: delegate.memo,
mint: delegate.mint,
})
} else {
await showOKAlert({
Expand Down
Loading