Skip to content

Commit

Permalink
chore: resolving conflicts with main
Browse files Browse the repository at this point in the history
  • Loading branch information
stas-kh committed Jun 12, 2023
2 parents 468544e + ee2690b commit d57a670
Show file tree
Hide file tree
Showing 17 changed files with 238 additions and 175 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"autolinker": "^3.14.2",
"confetti-js": "github:deso-protocol/confetti-js",
"currency-symbol-map": "^5.0.1",
"deso-protocol": "^2.0.0-beta.9",
"deso-protocol": "^2.0.5",
"intro.js": "^4.2.2",
"lodash": "^4.17.15",
"ngx-bootstrap": "^6.2.0",
Expand Down
15 changes: 13 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ChangeDetectorRef, Component, HostListener, OnInit } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { configure, identity, User } from "deso-protocol";
import { Identity } from "deso-protocol/src/identity/identity";
import * as introJs from "intro.js/intro.js";
import isEqual from "lodash/isEqual";
import isNil from "lodash/isNil";
Expand Down Expand Up @@ -56,6 +57,16 @@ export class AppComponent implements OnInit {
SUBMIT_POST: "UNLIMITED",
NEW_MESSAGE: "UNLIMITED",
BASIC_TRANSFER: "UNLIMITED",
FOLLOW: "UNLIMITED",
LIKE: "UNLIMITED",
CREATOR_COIN: "UNLIMITED",
CREATOR_COIN_TRANSFER: "UNLIMITED",
ACCEPT_NFT_BID: "UNLIMITED",
BURN_NFT: "UNLIMITED",
CREATE_USER_ASSOCIATION: "UNLIMITED",
CREATE_POST_ASSOCIATION: "UNLIMITED",
ACCESS_GROUP: "UNLIMITED",
ACCESS_GROUP_MEMBERS: "UNLIMITED",
},
CreatorCoinOperationLimitMap: {
"": { any: "UNLIMITED" },
Expand Down Expand Up @@ -159,7 +170,7 @@ export class AppComponent implements OnInit {

this.callingUpdateTopLevelData = true;

const { currentUser } = identity.snapshot();
const { currentUser } = (identity as Identity<Storage>).snapshot();

return zip(
this.backendApi.GetUsersStateless([currentUser?.publicKey], false),
Expand Down Expand Up @@ -350,7 +361,7 @@ export class AppComponent implements OnInit {
loadApp() {
// Load service worker for push notifications.
this.globalVars.initializeWebPush();
const { currentUser, alternateUsers } = identity.snapshot();
const { currentUser, alternateUsers } = (identity as Identity<Storage>).snapshot();
this.tracking.log("page : load", { isLoggedIn: !!currentUser });

let publicKeys = [];
Expand Down
223 changes: 112 additions & 111 deletions src/app/backend-api.service.ts
Original file line number Diff line number Diff line change
@@ -1,115 +1,116 @@
import { HttpClient, HttpErrorResponse } from "@angular/common/http";
import { Injectable } from "@angular/core";
import {
acceptNFTBid,
acceptNFTTransfer,
adminGetAllUserGlobalMetadata,
adminGetBuyDesoFeeBasisPoints,
adminGetHotFeedAlgorithm,
adminGetHotFeedUserMultiplier,
adminGetMempoolStats,
adminGetNFTDrop,
adminGetUnfilteredHotFeed,
adminGetUSDCentsToDESOReserveExchangeRate,
adminGetUserAdminData,
adminGetUserGlobalMetadata,
adminGetUsernameVerificationAuditLog,
adminGetVerifiedUsers,
adminGetWyreWalletOrderQuotation,
adminGetWyreWalletOrderReservation,
adminGetWyreWalletOrdersForUser,
adminGrantVerificationBadge,
adminNodeControl,
adminPinPost,
adminRemoveNilPosts,
adminRemoveVerificationBadge,
adminReprocessBitcoinBlock,
adminSetBuyDesoFeeBasisPoints,
adminSetUSDCentsToDESOReserveExchangeRate,
adminSwapIdentity,
adminUpdateGlobalFeed,
adminUpdateGlobalParams,
adminUpdateHotFeedAlgorithm,
adminUpdateHotFeedPostMultiplier,
adminUpdateHotFeedUserMultiplier,
adminUpdateNFTDrop,
adminUpdateUserGlobalMetadata,
blockPublicKey,
buildProfilePictureUrl,
buildProxyImageURL,
burnNFT,
buyCreatorCoin,
checkPartyAccessGroups,
ConstructedTransactionResponse,
countPostAssociations,
createNFT,
createNFTBid,
createPostAssociation,
decryptChatMessage,
deletePostAssociation,
DeSoBodySchema,
encryptChatMessage,
getAllBidsForNFT,
getAppState,
getBlockTemplate,
GetBlockTemplateResponse,
getDiamondedPosts,
getDiamondsForPost,
getDiamondsForUser,
GetExchangeRateResponse,
getExchangeRates,
getFollowersForUser,
getFullTikTokURL,
getGlobalParams,
getHodlersForUser,
getHotFeed,
getLikesForPost,
getLinkPreview,
getNFTBidsForUser,
getNFTCollectionSummary,
getNFTEntriesForPost,
getNFTsForUser,
getNFTShowcase,
getNotifications,
getPostAssociations,
getPostsForUser,
getPostsStateless,
getProfiles,
getQuoteRepostsForPost,
getRepostsForPost,
getSinglePost,
getSingleProfile,
getTransaction,
GetTxnResponse,
getUnreadNotificationsCount,
getUserGlobalMetadata,
getUserMetadata,
GetUserMetadataResponse,
GetUsersResponse,
getUsersStateless,
getVideoStatus,
HodlersSortType,
identity,
NFTEntryResponse,
PostEntryResponse,
resendVerifyEmail,
sellCreatorCoin,
sendDeso,
SendDeSoResponse,
sendDiamonds,
setNotificationMetadata,
submitPost,
transferCreatorCoin,
transferNFT,
updateFollowingStatus,
updateNFT,
updateProfile,
updateUserGlobalMetadata,
uploadImage,
uploadVideo,
UploadVideoV2Response,
verifyEmail
acceptNFTBid,
acceptNFTTransfer,
adminGetAllUserGlobalMetadata,
adminGetBuyDesoFeeBasisPoints,
adminGetHotFeedAlgorithm,
adminGetHotFeedUserMultiplier,
adminGetMempoolStats,
adminGetNFTDrop,
adminGetUnfilteredHotFeed,
adminGetUSDCentsToDESOReserveExchangeRate,
adminGetUserAdminData,
adminGetUserGlobalMetadata,
adminGetUsernameVerificationAuditLog,
adminGetVerifiedUsers,
adminGetWyreWalletOrderQuotation,
adminGetWyreWalletOrderReservation,
adminGetWyreWalletOrdersForUser,
adminGrantVerificationBadge,
adminNodeControl,
adminPinPost,
adminRemoveNilPosts,
adminRemoveVerificationBadge,
adminReprocessBitcoinBlock,
adminSetBuyDesoFeeBasisPoints,
adminSetUSDCentsToDESOReserveExchangeRate,
adminSwapIdentity,
adminUpdateGlobalFeed,
adminUpdateGlobalParams,
adminUpdateHotFeedAlgorithm,
adminUpdateHotFeedPostMultiplier,
adminUpdateHotFeedUserMultiplier,
adminUpdateNFTDrop,
adminUpdateUserGlobalMetadata,
blockPublicKey,
buildProfilePictureUrl,
buildProxyImageURL,
burnNFT,
buyCreatorCoin,
checkPartyAccessGroups,
ConstructedTransactionResponse,
countPostAssociations,
createNFT,
createNFTBid,
createPostAssociation,
decryptChatMessage,
deletePostAssociation,
DeSoBodySchema,
encryptChatMessage,
getAllBidsForNFT,
getAppState,
getBlockTemplate,
GetBlockTemplateResponse,
getDiamondedPosts,
getDiamondsForPost,
getDiamondsForUser,
GetExchangeRateResponse,
getExchangeRates,
getFollowersForUser,
getFullTikTokURL,
getGlobalParams,
getHodlersForUser,
getHotFeed,
getLikesForPost,
getLinkPreview,
getNFTBidsForUser,
getNFTCollectionSummary,
getNFTEntriesForPost,
getNFTsForUser,
getNFTShowcase,
getNotifications,
getPostAssociations,
getPostsForUser,
getPostsStateless,
getProfiles,
getQuoteRepostsForPost,
getRepostsForPost,
getSinglePost,
getSingleProfile,
getTransaction,
GetTxnResponse,
getUnreadNotificationsCount,
getUserGlobalMetadata,
getUserMetadata,
GetUserMetadataResponse,
GetUsersResponse,
getUsersStateless,
getVideoStatus,
HodlersSortType,
identity,
NFTEntryResponse,
PostEntryResponse,
resendVerifyEmail,
sellCreatorCoin,
sendDeso,
SendDeSoResponse,
sendDiamonds,
setNotificationMetadata,
submitPost,
transferCreatorCoin,
transferNFT,
updateFollowingStatus,
updateNFT,
updateProfile,
updateUserGlobalMetadata,
uploadImage,
uploadVideo,
UploadVideoV2Response,
verifyEmail
} from "deso-protocol";
import { Identity } from "deso-protocol/src/identity/identity";
import { EMPTY, forkJoin, from, Observable, of, throwError } from "rxjs";
import { catchError, expand, map, reduce, switchMap, tap } from "rxjs/operators";
import { environment } from "src/environments/environment";
Expand Down Expand Up @@ -439,7 +440,7 @@ export class BackendApiService {
})
).pipe(
switchMap((resp) => {
const identityState = identity.snapshot();
const identityState = (identity as Identity<Storage>).snapshot();
if (!identityState.currentUser) {
throw new Error("No identityState.currentUser");
}
Expand Down Expand Up @@ -488,7 +489,7 @@ export class BackendApiService {
})
).pipe(
switchMap((resp) => {
const identityState = identity.snapshot();
const identityState = (identity as Identity<Storage>).snapshot();
if (!identityState.currentUser) {
throw new Error("No identityState.currentUser");
}
Expand Down Expand Up @@ -591,7 +592,7 @@ export class BackendApiService {
})
).pipe(
switchMap((resp) => {
const identityState = identity.snapshot();
const identityState = (identity as Identity<Storage>).snapshot();
if (!identityState.currentUser) {
throw new Error("No identityState.currentUser");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, Renderer2 } from "@angular/core";
import { Router } from "@angular/router";
import { identity } from "deso-protocol";
import { Identity } from "deso-protocol/src/identity/identity";
import { BsModalService } from "ngx-bootstrap/modal";
import { from } from "rxjs";
import { BackendApiService } from "../backend-api.service";
Expand Down Expand Up @@ -28,7 +29,7 @@ export class ChangeAccountSelectorComponent {

launchLogoutFlow() {
from(identity.logout()).subscribe(() => {
const { alternateUsers } = identity.snapshot();
const { alternateUsers } = (identity as Identity<Storage>).snapshot();
const users = Object.keys(alternateUsers ?? {});

this.globalVars.userList = this.globalVars.userList.filter((user) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@
<span class="fc-muted">&nbsp;FR</span>
</div>
</div>
<!-- <div *ngIf="profile?.Username" [ngClass]="{ 'mt-10px': globalVars.isMobile() }">-->
<!-- <a class="fc-blue" [href]="getUserDetailsLink()">View Activity</a>-->
<!-- </div>-->
<div *ngIf="profile?.Username" [ngClass]="{ 'mt-10px': globalVars.isMobile() }">
<a class="fc-blue" [href]="getUserDetailsLink()" target="_blank">View Activity</a>
</div>
</div>
<button
class="primary-button w-100 mt-20px"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class CreatorProfileTopCardComponent implements OnInit, OnDestroy {
return this.profile.CoinEntry.CreatorBasisPoints / 100;
}

// getUserDetailsLink() {
// return `https://www.openprosper.com/u/${this.profile?.Username}`;
// }
getUserDetailsLink() {
return `https://wallet.deso.com/?user=${this.profile?.Username}&tab=activity`;
}
}
6 changes: 3 additions & 3 deletions src/app/feed/feed-create-post/feed-create-post.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class FeedCreatePostComponent implements OnInit {
embedUrlParserService = EmbedUrlParserService;

readonly REQUIRED_POLL_OPTIONS: number = 2;
readonly MAX_POLL_OPTIONS: number = 5;
readonly MAX_POLL_OPTIONS: number = 20;
readonly MAX_POLL_CHARACTERS: number = 50;
readonly POLL_WEIGHT_TYPE_LABELS = {
[PollWeightType.unweighted]: "Simple poll",
Expand Down Expand Up @@ -517,8 +517,8 @@ export class FeedCreatePostComponent implements OnInit {
}

async uploadVideo(file: File): Promise<any> {
if (file.size > 65 * 1024 * 1024) {
this.globalVars._alertError("File is too large. Please choose a file less than 65MB");
if (file.size > 250 * 1024 * 1024) {
this.globalVars._alertError("File is too large. Please choose a file less than 250MB");
return;
}
this.currentPostModel.isUploadingMedia = true;
Expand Down
Loading

0 comments on commit d57a670

Please sign in to comment.