Closed fachryluid closed 1 year ago
I got this error while authenticating user on testnet
This is my typescript code
import axios from 'axios'; declare global { interface Window { Pi:any; } } interface PaymentDTO { amount: number, user_uid: string, created_at: string, identifier: string, metadata: Object, memo: string, status: { developer_approved: boolean, transaction_verified: boolean, developer_completed: boolean, cancelled: boolean, user_cancelled: boolean, }, to_address: string, transaction: null | { txid: string, verified: boolean, _link: string, }, }; type AuthResult = { accessToken: string, user: { uid: string, username: string } }; const signIn = async () => { const scopes = ['username', 'payments']; const authResult: AuthResult = await window.Pi.authenticate(scopes, onIncompletePaymentFound); console.log(authResult) } const onIncompletePaymentFound = (payment: PaymentDTO) => { console.log("onIncompletePaymentFound", payment); // return axiosClient.post('/payments/incomplete', {payment}); } export default { signIn }
console
I got this error while authenticating user on testnet
This is my typescript code
console