Skip to content

Commit c9d0437

Browse files
committed
fix: 2fa auth & wishlist check
1 parent 2efef34 commit c9d0437

File tree

8 files changed

+13
-11
lines changed

8 files changed

+13
-11
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ yarn-error.log
6161

6262
# Keystore infos
6363
key.properties
64+
release.jks
6465

6566
# Firebase
6667
google-services.json

android/app/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ android {
118118
applicationId "dev.vasc.vshop2"
119119
minSdkVersion rootProject.ext.minSdkVersion
120120
targetSdkVersion rootProject.ext.targetSdkVersion
121-
versionCode 52
121+
versionCode 53
122122
versionName npmVersion
123123
}
124124

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vshop_mobile",
3-
"version": "2.7.2",
3+
"version": "2.7.3",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",

src/screens/ReAuth.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { useFeatureStore } from "../stores/features";
2828
import { checkDonator } from "../utils/VShopAPI";
2929

3030
const LOGIN_URL =
31-
"https://auth.riotgames.com/login#client_id=play-valorant-web-prod&nonce=1&redirect_uri=https%3A%2F%2Fplayvalorant.com%2Fopt_in&response_type=token%20id_token&scope=openid%20account";
31+
"https://auth.riotgames.com/authorize?redirect_uri=https%3A%2F%2Fplayvalorant.com%2Fopt_in&client_id=play-valorant-web-prod&response_type=token%20id_token&nonce=1&scope=account%20openid";
3232

3333
export default function ReAuthScreen() {
3434
const { t } = useTranslation();

src/screens/Wizard.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { checkDonator } from "../utils/VShopAPI";
3434

3535
const { width: windowWidth, height: windowHeight } = Dimensions.get("window");
3636
const LOGIN_URL =
37-
"https://auth.riotgames.com/login#client_id=play-valorant-web-prod&nonce=1&redirect_uri=https%3A%2F%2Fplayvalorant.com%2Fopt_in&response_type=token%20id_token&scope=openid%20account";
37+
"https://auth.riotgames.com/authorize?redirect_uri=https%3A%2F%2Fplayvalorant.com%2Fopt_in&client_id=play-valorant-web-prod&response_type=token%20id_token&nonce=1&scope=account%20openid";
3838
export default function WizardScreen() {
3939
const navigation = useNavigation<any>();
4040
const scrollViewRef = React.useRef<ScrollView>(null);

src/utils/VShopAPI.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios from "axios";
22

33
export const getBackendUrl = () => {
4-
if (__DEV__) return "http://10.0.2.2:3333";
4+
if (__DEV__) return "http://10.0.2.2:8787";
55
return "https://api.vshop.one";
66
};
77

src/utils/ValorantAPI.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export let offers: any = {};
4444
export let skins: ISkin[] = [];
4545

4646
const extraHeaders = {
47-
"X-Riot-ClientVersion": "",
47+
"X-Riot-ClientVersion": "43.0.1.4195386.4190634",
4848
"X-Riot-ClientPlatform": btoa(
4949
JSON.stringify({
5050
platformType: "PC",
@@ -116,7 +116,7 @@ export async function getUsername(
116116
data: [userId],
117117
});
118118

119-
return res.data[0].GameName != "" ? res.data[0].GameName : "?";
119+
return res.data[0].GameName !== "" ? res.data[0].GameName : "?";
120120
}
121121

122122
export async function loadOffers(
@@ -197,7 +197,7 @@ export async function parseShop(shop: IStorefrontV2) {
197197
(item: any) => item.Item.ItemTypeID === VItemTypes.SkinLevel,
198198
).map((item: any) => {
199199
const skin = skins.find(
200-
(skin) => skin.levels[0].uuid == item.Item.ItemID,
200+
(skin) => skin.levels[0].uuid === item.Item.ItemID,
201201
) as ISkin;
202202

203203
return {
@@ -214,7 +214,9 @@ export async function parseShop(shop: IStorefrontV2) {
214214
var bonusStore = shop.BonusStore.BonusStoreOffers;
215215
for (var i = 0; i < bonusStore.length; i++) {
216216
let itemid = bonusStore[i].Offer.Rewards[0].ItemID;
217-
const skin = skins.find((skin) => skin.levels[0].uuid == itemid) as ISkin;
217+
const skin = skins.find(
218+
(skin) => skin.levels[0].uuid === itemid,
219+
) as ISkin;
218220

219221
nightMarket[i] = {
220222
...skin,
@@ -295,7 +297,7 @@ export const reAuth = () =>
295297
},
296298
data: {
297299
client_id: "play-valorant-web-prod",
298-
nonce: 1,
300+
nonce: "1",
299301
redirect_uri: "https://playvalorant.com/opt_in",
300302
response_type: "token id_token",
301303
response_mode: "query",

src/utils/WishlistServiceTask.ts

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import PushNotification from "react-native-push-notification";
1111
import axios from "axios";
1212
import i18n from "./localization";
1313
import { useWishlistStore } from "../stores/wishlistNotification";
14-
import messaging from "@react-native-firebase/messaging";
1514
import { checkDonator } from "./VShopAPI";
1615

1716
export default async function () {

0 commit comments

Comments
 (0)