diff --git a/Adamant.xcodeproj/project.pbxproj b/Adamant.xcodeproj/project.pbxproj index 902d977ab..3a93cdfa1 100644 --- a/Adamant.xcodeproj/project.pbxproj +++ b/Adamant.xcodeproj/project.pbxproj @@ -3140,7 +3140,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 3.2.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "im.adamant.adamant-messenger-dev.MessageNotificationContentExtension"; @@ -3170,7 +3170,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 3.2.1; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "im.adamant.adamant-messenger.MessageNotificationContentExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -3322,7 +3322,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 3.2.0; + MARKETING_VERSION = 3.2.1; PRODUCT_BUNDLE_IDENTIFIER = "im.adamant.adamant-messenger-dev"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3353,7 +3353,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 3.2.0; + MARKETING_VERSION = 3.2.1; PRODUCT_BUNDLE_IDENTIFIER = "im.adamant.adamant-messenger"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3381,7 +3381,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 3.2.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "im.adamant.adamant-messenger-dev.TransferNotificationContentExtension"; @@ -3411,7 +3411,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 3.2.1; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "im.adamant.adamant-messenger.TransferNotificationContentExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -3442,7 +3442,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 3.2.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "im.adamant.adamant-messenger-dev.NotificationServiceExtension"; @@ -3472,7 +3472,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.0; + MARKETING_VERSION = 3.2.1; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "im.adamant.adamant-messenger.NotificationServiceExtension"; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Adamant/AppDelegate.swift b/Adamant/AppDelegate.swift index 74820c1a2..7af0cdaa8 100644 --- a/Adamant/AppDelegate.swift +++ b/Adamant/AppDelegate.swift @@ -524,7 +524,7 @@ extension AppDelegate { unread = true } - if let adelina = AdamantContacts.adelina.messages["chats.welcome_message"] { + if let adelina = AdamantContacts.adelina.welcomeMessage { _ = try? await chatProvider.fakeReceived( message: adelina.message, senderId: AdamantContacts.adelina.address, @@ -535,7 +535,7 @@ extension AppDelegate { ) } - if let exchenge = AdamantContacts.adamantExchange.messages["chats.welcome_message"] { + if let exchenge = AdamantContacts.adamantExchange.welcomeMessage { _ = try? await chatProvider.fakeReceived( message: exchenge.message, senderId: AdamantContacts.adamantExchange.address, @@ -546,7 +546,7 @@ extension AppDelegate { ) } - if let betOnBitcoin = AdamantContacts.betOnBitcoin.messages["chats.welcome_message"] { + if let betOnBitcoin = AdamantContacts.betOnBitcoin.welcomeMessage { _ = try? await chatProvider.fakeReceived( message: betOnBitcoin.message, senderId: AdamantContacts.betOnBitcoin.address, @@ -557,7 +557,7 @@ extension AppDelegate { ) } - if let welcome = AdamantContacts.donate.messages["chats.welcome_message"] { + if let welcome = AdamantContacts.donate.welcomeMessage { _ = try? await chatProvider.fakeReceived( message: welcome.message, senderId: AdamantContacts.donate.address, @@ -568,7 +568,7 @@ extension AppDelegate { ) } - if let welcome = AdamantContacts.adamantWelcomeWallet.messages["chats.welcome_message"] { + if let welcome = AdamantContacts.adamantWelcomeWallet.welcomeMessage { _ = try? await chatProvider.fakeReceived( message: welcome.message, senderId: AdamantContacts.adamantWelcomeWallet.name, diff --git a/Adamant/ServiceProtocols/DataProviders/AccountsProvider.swift b/Adamant/ServiceProtocols/DataProviders/AccountsProvider.swift index 0146a2ff6..d346ba60f 100644 --- a/Adamant/ServiceProtocols/DataProviders/AccountsProvider.swift +++ b/Adamant/ServiceProtocols/DataProviders/AccountsProvider.swift @@ -105,6 +105,15 @@ extension AdamantContacts { } } + var welcomeMessage: SystemMessage? { + if + let regionCode = Locale.current.regionCode, + prohibitedRegions.contains(regionCode) + { return nil } + + return messages["chats.welcome_message"] + } + var messages: [String: SystemMessage] { switch self { case .adamantBountyWallet, .adamantNewBountyWallet: @@ -168,4 +177,13 @@ extension AdamantContacts { )] } } + + var prohibitedRegions: [String] { + switch self { + case .adelina: + return ["CN"] + case .adamantBountyWallet, .adamantNewBountyWallet, .adamantExchange, .betOnBitcoin, .donate, .pwaBountyBot, .adamantIco, .adamantWelcomeWallet, .adamantSupport: + return [] + } + } } diff --git a/Adamant/Stories/Settings/Contribute/ContributeState.swift b/Adamant/Stories/Settings/Contribute/ContributeState.swift index 6599182e8..fd26de230 100644 --- a/Adamant/Stories/Settings/Contribute/ContributeState.swift +++ b/Adamant/Stories/Settings/Contribute/ContributeState.swift @@ -48,6 +48,12 @@ struct ContributeState { description: .localized("Contribute.Section.CodeContributeDescription", comment: .empty), link: URL(string: "https://github.com/Adamant-im") ), + .init( + image: .asset(named: "row_buy-coins") ?? .init(), + name: .localized("Contribute.Section.Donate", comment: .empty), + description: .localized("Contribute.Section.DonateDescription", comment: .empty), + link: URL(string: "https://adamant.im/donate") + ), .init( image: .asset(named: "row_rate") ?? .init(), name: .localized("Contribute.Section.Rate", comment: .empty), diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/Contents.json b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/Contents.json new file mode 100644 index 000000000..eac049afb --- /dev/null +++ b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "verse_notification.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "verse_notification@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "verse_notification@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/verse_notification.png b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/verse_notification.png new file mode 100644 index 000000000..aa7be0a56 Binary files /dev/null and b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/verse_notification.png differ diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/verse_notification@2x.png b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/verse_notification@2x.png new file mode 100644 index 000000000..29eb98e24 Binary files /dev/null and b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/verse_notification@2x.png differ diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/verse_notification@3x.png b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/verse_notification@3x.png new file mode 100644 index 000000000..be130ddff Binary files /dev/null and b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_notification.imageset/verse_notification@3x.png differ diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/Contents.json b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/Contents.json new file mode 100644 index 000000000..4dab739fb --- /dev/null +++ b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "verse_wallet.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "verse_wallet@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "verse_wallet@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/verse_wallet.png b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/verse_wallet.png new file mode 100644 index 000000000..aa7be0a56 Binary files /dev/null and b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/verse_wallet.png differ diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/verse_wallet@2x.png b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/verse_wallet@2x.png new file mode 100644 index 000000000..29eb98e24 Binary files /dev/null and b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/verse_wallet@2x.png differ diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/verse_wallet@3x.png b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/verse_wallet@3x.png new file mode 100644 index 000000000..be130ddff Binary files /dev/null and b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet.imageset/verse_wallet@3x.png differ diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/Contents.json b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/Contents.json new file mode 100644 index 000000000..ddea69321 --- /dev/null +++ b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "verse_wallet_row.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "verse_wallet_row@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "verse_wallet_row@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/verse_wallet_row.png b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/verse_wallet_row.png new file mode 100644 index 000000000..aa7be0a56 Binary files /dev/null and b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/verse_wallet_row.png differ diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/verse_wallet_row@2x.png b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/verse_wallet_row@2x.png new file mode 100644 index 000000000..29eb98e24 Binary files /dev/null and b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/verse_wallet_row@2x.png differ diff --git a/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/verse_wallet_row@3x.png b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/verse_wallet_row@3x.png new file mode 100644 index 000000000..be130ddff Binary files /dev/null and b/CommonKit/Sources/CommonKit/Assets/Shared.xcassets/Wallets/verse_wallet_row.imageset/verse_wallet_row@3x.png differ diff --git a/CommonKit/Sources/CommonKit/Models/ethereumTokensList.swift b/CommonKit/Sources/CommonKit/Models/ethereumTokensList.swift index 0dc898def..2961e7f60 100644 --- a/CommonKit/Sources/CommonKit/Models/ethereumTokensList.swift +++ b/CommonKit/Sources/CommonKit/Models/ethereumTokensList.swift @@ -255,6 +255,18 @@ defaultGasPriceGwei: 30, defaultGasLimit: 58000, warningGasPriceGwei: 70), + ERC20Token(symbol: "VERSE", + name: "Verse", + contractAddress: "0x249cA82617eC3DfB2589c4c17ab7EC9765350a18", + decimals: 18, + naturalUnits: 18, + defaultVisibility: true, + defaultOrdinalLevel: 95, + reliabilityGasPricePercent: 10, + reliabilityGasLimitPercent: 10, + defaultGasPriceGwei: 30, + defaultGasLimit: 58000, + warningGasPriceGwei: 70), ERC20Token(symbol: "WOO", name: "WOO Network", contractAddress: "0x4691937a7508860f876c9c0a2a617e7d9e945d4b", diff --git a/NotificationServiceExtension/WalletImages/verse_notificationContent.png b/NotificationServiceExtension/WalletImages/verse_notificationContent.png new file mode 100644 index 000000000..be130ddff Binary files /dev/null and b/NotificationServiceExtension/WalletImages/verse_notificationContent.png differ