Skip to content

Commit

Permalink
sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Oct 16, 2023
1 parent 484933e commit b54a745
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@blocto/web3-react-connector": "^1.0.0",
"@coinbase/wallet-sdk": "^3.0.4",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@kybernetwork/oauth2": "1.0.1-rc.3",
"@kybernetwork/oauth2": "1.0.1-rc.4",
"@kyberswap/krystal-walletconnect-v2": "0.0.1",
"@kyberswap/ks-sdk-classic": "^1.0.3",
"@kyberswap/ks-sdk-core": "1.0.11",
Expand Down
7 changes: 6 additions & 1 deletion src/pages/Oauth/AuthForm/EmailLoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ const EmailLoginForm = ({ flowStatus }: { flowStatus: FlowStatus }) => {
console.debug('resp loginEmail', resp)
}

const qs = useParsedQueryString<{ flow: string }>()
const onSendCode = async ({ email }: { email: string }) => {
return KyberOauth2.oauthUi.sendVerifyCode({ email, flow: qs.flow + '' })
}

return (
<Wrapper>
<InputEmailWithVerification
Expand All @@ -51,7 +56,7 @@ const EmailLoginForm = ({ flowStatus }: { flowStatus: FlowStatus }) => {
style={{ width: 340, height: 36 }}
onDismissVerifyModal={onDismissVerifyModal}
isShowVerify={isShowVerify}
sendCode={KyberOauth2.oauthUi.sendVerifyCode}
sendCode={onSendCode}
verifyCode={onVerifyCode}
/>
<ButtonPrimary height={'36px'} onClick={onVerifyEmail}>
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2257,10 +2257,10 @@
bs58 "^5.0.0"
uuid "^8.3.2"

"@kybernetwork/oauth2@1.0.1-rc.3":
version "1.0.1-rc.3"
resolved "https://npm.pkg.github.com/download/@kybernetwork/oauth2/1.0.1-rc.3/203f2fdca94c06938ab606111b90f7b15e6e8cef#203f2fdca94c06938ab606111b90f7b15e6e8cef"
integrity sha512-HJufZhA/wPeF5d/8/swXh9Pd/E7OzJ1iQpOysaJ8WUIUUgAxYb54j2cVX5COAd76r5EctD0ge4ekhOSRDcNVAg==
"@kybernetwork/oauth2@1.0.1-rc.4":
version "1.0.1-rc.4"
resolved "https://npm.pkg.github.com/download/@kybernetwork/oauth2/1.0.1-rc.4/954d9fd7699ac79bcce1a91a5159e451b98d3ed9#954d9fd7699ac79bcce1a91a5159e451b98d3ed9"
integrity sha512-word23WbqARrHIAR/JStAvSdmupQZC07k8xCU2VidRjeT2nhLxvi+4j/FLBKwzLvgObvBHnqDCqbr9D434qjXQ==
dependencies:
axios "1.2.1"
client-oauth2 "^4.3.3"
Expand Down

0 comments on commit b54a745

Please sign in to comment.