File tree Expand file tree Collapse file tree 8 files changed +27
-15
lines changed
Expand file tree Collapse file tree 8 files changed +27
-15
lines changed Original file line number Diff line number Diff line change @@ -154,9 +154,8 @@ export class OrderController implements IOrderController {
154154
155155 const redirectUrl = await this . openPayments . setupOneClick (
156156 walletAddressUrl ,
157- amount
157+ Number ( amount )
158158 )
159-
160159 res . status ( 200 ) . json ( toSuccessResponse ( { redirectUrl } ) )
161160 } catch ( err ) {
162161 next ( err )
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { oneClickSetupSchema } from '@boutique/shared'
77
88interface SetupOneClickMutationParams {
99 walletAddressUrl : string
10- amount : number
10+ amount : number | string
1111}
1212
1313interface SetupOneClickMutationResponse {
Original file line number Diff line number Diff line change @@ -34,5 +34,9 @@ export const setupFinishSchema = finishOrderSchema.extend({
3434
3535export const oneClickSetupSchema = z . object ( {
3636 walletAddressUrl : walletAddressUrlSchema ,
37- amount : z . number ( )
37+ amount : z
38+ . union ( [ z . string ( ) , z . number ( ) ] )
39+ . refine ( ( value ) => ! isNaN ( Number ( value ) ) , {
40+ message : 'Must be a valid number'
41+ } )
3842} )
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ export class App {
277277 router . get ( '/grants/:id' , isAuth , grantController . getById )
278278 router . delete ( '/grants/:id' , isAuth , grantController . revoke )
279279 router . get (
280- '/grant-interactions/:interactionId/:nonce' ,
280+ '/grant-interactions/:interactionId/:nonce/ ' ,
281281 isAuth ,
282282 grantController . getByInteraction
283283 )
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ export class UserService implements IUserService {
156156 const boutiqueWallet = await this . walletAddressService . create ( {
157157 accountId : boutiqueInfo . defaultAccount . id ,
158158 walletAddressName : 'boutique' ,
159- publicName : 'Default Payment Pointer ' ,
159+ publicName : 'Rafiki Boutique ' ,
160160 userId : boutiqueInfo . createdUser . id ,
161161 isWM : false
162162 } )
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ const createGrantsService = (): GrantsService => ({
121121 ...( cookies ? { Cookie : cookies } : { } )
122122 }
123123 } )
124- . json < GetGrantResult > ( )
124+ . json < GetGrantResponse > ( )
125125 return response
126126 } catch ( error ) {
127127 return getError ( error , 'Unable to fetch grant request details.' )
Original file line number Diff line number Diff line change @@ -58,10 +58,21 @@ const GrantInteractionPage = ({
5858 width = { 500 }
5959 height = { 150 }
6060 />
61- < div className = "mt-20 text-xl text-green" >
62- < span className = "font-semibold" > { client } </ span > wants to access your
63- wallet account and withdraw{ ' ' }
64- { access ?. limits ?. debitAmount ?. formattedAmount } .
61+ < div className = "mt-20 text-base" >
62+ < div >
63+ < span className = "font-semibold" > { client } </ span > is requesting access
64+ to make a payment on your behalf.
65+ </ div >
66+ < div >
67+ Wallet Address client:{ ' ' }
68+ < span className = "font-semibold" > { grant . client } </ span >
69+ </ div >
70+ < div >
71+ Total amount to debit:{ ' ' }
72+ < span className = "font-semibold" >
73+ { access ?. limits ?. debitAmount ?. formattedAmount }
74+ </ span >
75+ </ div >
6576 </ div >
6677 < div className = "mx-auto mt-10 flex w-full max-w-xl justify-evenly" >
6778 < Button
@@ -97,8 +108,8 @@ const GrantInteractionPage = ({
97108 />
98109 < div className = "mt-20 text-xl text-green" >
99110 The request from < span className = "font-semibold" > { client } </ span > to
100- access your wallet account and withdraw { ' ' }
101- { access ?. limits ?. debitAmount ?. formattedAmount } was previously
111+ make a payment on your behalf for the amount of
112+ { access ?. limits ?. debitAmount ?. formattedAmount } , was previously
102113 processed.
103114 </ div >
104115 < div className = "mx-auto mt-10 flex w-full max-w-xl justify-evenly" >
Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ const AccountSettingsPage: NextPageWithLayout<AccountSettingsProps> = ({
2121 < SettingsTabs />
2222 < div className = "flex w-full flex-col md:max-w-lg" >
2323 < PersonalSettingsForm user = { user } />
24- { /* <Divider />
25- <ChangePasswordForm /> */ }
2624 </ div >
2725 < SmallBubbles className = "mt-10 block w-full md:hidden" />
2826 < Image
You can’t perform that action at this time.
0 commit comments