Skip to content

Commit

Permalink
Merge pull request #900 from novasamatech/develop
Browse files Browse the repository at this point in the history
7.4.x Swaps on Asset Hub
  • Loading branch information
ERussel authored Nov 25, 2023
2 parents 573232f + eb3896e commit ec89d0b
Show file tree
Hide file tree
Showing 356 changed files with 17,668 additions and 1,306 deletions.
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ abstract_target 'novawalletAll' do
pod 'SwiftLint'
pod 'R.swift', :inhibit_warnings => true
pod 'SoraKeystore', '~> 1.0.0'
pod 'SoraUI', :git => 'https://github.com/ERussel/UIkit-iOS.git', :tag => '1.11.1'
pod 'SoraUI', :git => 'https://github.com/ERussel/UIkit-iOS.git', :tag => '1.12.0'
pod 'RobinHood', '~> 2.6.0'
pod 'SoraFoundation', :git => 'https://github.com/ERussel/Foundation-iOS.git', :tag => '1.1.0'
pod 'SwiftyBeaver'
Expand Down
60 changes: 30 additions & 30 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,38 +60,38 @@ PODS:
- SoraFoundation/NotificationHandlers
- SoraFoundation/ViewModel (1.1.0)
- SoraKeystore (1.0.0)
- SoraUI (1.11.1):
- SoraUI/AdaptiveDesign (= 1.11.1)
- SoraUI/Animator (= 1.11.1)
- SoraUI/Camera (= 1.11.1)
- SoraUI/Controls (= 1.11.1)
- SoraUI/DetailsView (= 1.11.1)
- SoraUI/EmptyState (= 1.11.1)
- SoraUI/Helpers (= 1.11.1)
- SoraUI/LoadingView (= 1.11.1)
- SoraUI/ModalPresentation (= 1.11.1)
- SoraUI/PageLoader (= 1.11.1)
- SoraUI/PinView (= 1.11.1)
- SoraUI/Skrull (= 1.11.1)
- SoraUI/AdaptiveDesign (1.11.1)
- SoraUI/Animator (1.11.1)
- SoraUI/Camera (1.11.1)
- SoraUI/Controls (1.11.1):
- SoraUI (1.12.0):
- SoraUI/AdaptiveDesign (= 1.12.0)
- SoraUI/Animator (= 1.12.0)
- SoraUI/Camera (= 1.12.0)
- SoraUI/Controls (= 1.12.0)
- SoraUI/DetailsView (= 1.12.0)
- SoraUI/EmptyState (= 1.12.0)
- SoraUI/Helpers (= 1.12.0)
- SoraUI/LoadingView (= 1.12.0)
- SoraUI/ModalPresentation (= 1.12.0)
- SoraUI/PageLoader (= 1.12.0)
- SoraUI/PinView (= 1.12.0)
- SoraUI/Skrull (= 1.12.0)
- SoraUI/AdaptiveDesign (1.12.0)
- SoraUI/Animator (1.12.0)
- SoraUI/Camera (1.12.0)
- SoraUI/Controls (1.12.0):
- SoraUI/Animator
- SoraUI/DetailsView (1.11.1):
- SoraUI/DetailsView (1.12.0):
- SoraUI/Controls
- SoraUI/EmptyState (1.11.1):
- SoraUI/EmptyState (1.12.0):
- SoraUI/Animator
- SoraUI/Helpers (1.11.1)
- SoraUI/LoadingView (1.11.1):
- SoraUI/Helpers (1.12.0)
- SoraUI/LoadingView (1.12.0):
- SoraUI/Controls
- SoraUI/ModalPresentation (1.11.1):
- SoraUI/ModalPresentation (1.12.0):
- SoraUI/Animator
- SoraUI/Controls
- SoraUI/PageLoader (1.11.1)
- SoraUI/PinView (1.11.1):
- SoraUI/PageLoader (1.12.0)
- SoraUI/PinView (1.12.0):
- SoraUI/Controls
- SoraUI/Skrull (1.11.1)
- SoraUI/Skrull (1.12.0)
- Sourcery (1.4.1)
- Starscream (4.0.8)
- SubstrateSdk (1.14.0):
Expand Down Expand Up @@ -159,7 +159,7 @@ DEPENDENCIES:
- SnapKit (~> 5.0.0)
- SoraFoundation (from `https://github.com/ERussel/Foundation-iOS.git`, tag `1.1.0`)
- SoraKeystore (~> 1.0.0)
- SoraUI (from `https://github.com/ERussel/UIkit-iOS.git`, tag `1.11.1`)
- SoraUI (from `https://github.com/ERussel/UIkit-iOS.git`, commit `a4eb0139a27d77f11b8e5083e125c38ea82d8e5e`)
- Sourcery (~> 1.4)
- Starscream (from `https://github.com/ERussel/Starscream.git`, tag `4.0.8`)
- SubstrateSdk (from `https://github.com/nova-wallet/substrate-sdk-ios.git`, tag `1.14.0`)
Expand Down Expand Up @@ -213,8 +213,8 @@ EXTERNAL SOURCES:
:git: https://github.com/ERussel/Foundation-iOS.git
:tag: 1.1.0
SoraUI:
:commit: a4eb0139a27d77f11b8e5083e125c38ea82d8e5e
:git: https://github.com/ERussel/UIkit-iOS.git
:tag: 1.11.1
Starscream:
:git: https://github.com/ERussel/Starscream.git
:tag: 4.0.8
Expand Down Expand Up @@ -244,8 +244,8 @@ CHECKOUT OPTIONS:
:git: https://github.com/ERussel/Foundation-iOS.git
:tag: 1.1.0
SoraUI:
:commit: a4eb0139a27d77f11b8e5083e125c38ea82d8e5e
:git: https://github.com/ERussel/UIkit-iOS.git
:tag: 1.11.1
Starscream:
:git: https://github.com/ERussel/Starscream.git
:tag: 4.0.8
Expand Down Expand Up @@ -285,7 +285,7 @@ SPEC CHECKSUMS:
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
SoraFoundation: 5b9d3c82d602150d2c2e65481c5eca5f5987c12c
SoraKeystore: 92cff6e2a12f212dd64ed089970ff7c365247b1c
SoraUI: e5ceb2cffe40145e589aa464e2e0a8d054011e0b
SoraUI: a3c1163a95c9dd1b6758ca90eb5bda2f4639d634
Sourcery: db66600e8b285c427701821598d07cf3c7e6c476
Starscream: b676ee89781677a2d8d36029a78c970710e2d3eb
SubstrateSdk: 1cb78eac5b05f2c259487f3027c3ae807f24c097
Expand All @@ -303,6 +303,6 @@ SPEC CHECKSUMS:
ZMarkupParser: a92d31ba40695b790f1da5fec98c3d4505341aff
ZNSTextAttachment: 4a9b4e8ee1ed087fc893ae6657dfb678f1a00340

PODFILE CHECKSUM: f37e3724d47617fb7ce7ed5e0a583491617b5899
PODFILE CHECKSUM: 812e09964099216590d3e74fcb350c38b2ccbd38

COCOAPODS: 1.13.0
862 changes: 842 additions & 20 deletions novawallet.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "0.100",
"blue" : "0xC7",
"green" : "0x9E",
"red" : "0x99"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x50",
"green" : "0x34",
"red" : "0xE5"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
12 changes: 12 additions & 0 deletions novawallet/Assets.xcassets/iconActionSwap.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "container-transaction-type.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "container-token.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "cross-chain.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
12 changes: 12 additions & 0 deletions novawallet/Assets.xcassets/iconForward.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "arrow-forward.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions novawallet/Assets.xcassets/iconInfoAccent.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "iconInfoAccent.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "iconInfoFilled.pdf",
"filename" : "new-info-icon.pdf",
"idiom" : "universal"
}
],
Expand All @@ -10,6 +10,6 @@
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
"template-rendering-intent" : "original"
}
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "options-nav-bar.svg",
"filename" : "options.pdf",
"idiom" : "universal"
}
],
Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions novawallet/Assets.xcassets/iconPencilEdit.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "iconPencilEdit.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions novawallet/Assets.xcassets/iconSwap.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "iconSwapOnDetails.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "iconInfo.pdf",
"filename" : "nova-wiki.pdf",
"idiom" : "universal"
}
],
Expand Down
Binary file not shown.
9 changes: 7 additions & 2 deletions novawallet/Common/Configs/ApplicationConfigs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ protocol ApplicationConfigProtocol {
var inAppUpdatesEntrypointURL: URL { get }
var inAppUpdatesChangelogsURL: URL { get }
var slip44URL: URL { get }
var wikiURL: URL { get }
}

final class ApplicationConfig {
Expand Down Expand Up @@ -129,9 +130,9 @@ extension ApplicationConfig: ApplicationConfigProtocol {

var chainListURL: URL {
#if F_RELEASE
URL(string: "https://raw.githubusercontent.com/novasamatech/nova-utils/master/chains/v15/chains.json")!
URL(string: "https://raw.githubusercontent.com/novasamatech/nova-utils/master/chains/v16/chains.json")!
#else
URL(string: "https://raw.githubusercontent.com/novasamatech/nova-utils/master/chains/v15/chains_dev.json")!
URL(string: "https://raw.githubusercontent.com/novasamatech/nova-utils/master/chains/v16/chains_dev.json")!
#endif
}

Expand Down Expand Up @@ -252,5 +253,9 @@ extension ApplicationConfig: ApplicationConfigProtocol {
URL(string: "https://raw.githubusercontent.com/novasamatech/nova-utils/master/assets/slip44.json")!
}

var wikiURL: URL {
URL(string: "https://docs.novawallet.io/nova-wallet-wiki")!
}

// swiftlint:enable line_length
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import SubstrateSdk

protocol GeneralStorageSubscriptionFactoryProtocol {
func getBlockNumberProvider(for chainId: ChainModel.Id) throws -> AnyDataProvider<DecodedBlockNumber>

func getAccountInfoProvider(
for accountId: AccountId,
chainId: ChainModel.Id
) throws -> AnyDataProvider<DecodedAccountInfo>
}

final class GeneralStorageSubscriptionFactory: SubstrateLocalSubscriptionFactory,
Expand All @@ -19,4 +24,24 @@ final class GeneralStorageSubscriptionFactory: SubstrateLocalSubscriptionFactory
shouldUseFallback: false
)
}

func getAccountInfoProvider(
for accountId: AccountId,
chainId: ChainModel.Id
) throws -> AnyDataProvider<DecodedAccountInfo> {
let codingPath = StorageCodingPath.account

let localKey = try LocalStorageKeyFactory().createFromStoragePath(
codingPath,
accountId: accountId,
chainId: chainId
)

return try getDataProvider(
for: localKey,
chainId: chainId,
storageCodingPath: codingPath,
shouldUseFallback: false
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ typealias DecodedActiveEra = ChainStorageDecodedItem<ActiveEraInfo>
typealias DecodedEraIndex = ChainStorageDecodedItem<StringScaleMapper<EraIndex>>
typealias DecodedPayee = ChainStorageDecodedItem<Staking.RewardDestinationArg>
typealias DecodedBlockNumber = ChainStorageDecodedItem<StringScaleMapper<BlockNumber>>
typealias DecodedAccountInfo = ChainStorageDecodedItem<AccountInfo>
typealias DecodedCrowdloanFunds = ChainStorageDecodedItem<CrowdloanFunds>
typealias DecodedBagListNode = ChainStorageDecodedItem<BagList.Node>
typealias DecodedPoolMember = ChainStorageDecodedItem<NominationPools.PoolMember>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,23 @@ protocol GeneralLocalStorageHandler {
result: Result<BlockNumber?, Error>,
chainId: ChainModel.Id
)

func handleAccountInfo(
result: Result<AccountInfo?, Error>,
accountId: AccountId,
chainId: ChainModel.Id
)
}

extension GeneralLocalStorageHandler {
func handleBlockNumber(
result _: Result<BlockNumber?, Error>,
chainId _: ChainModel.Id
) {}

func handleAccountInfo(
result _: Result<AccountInfo?, Error>,
accountId _: AccountId,
chainId _: ChainModel.Id
) {}
}
Loading

0 comments on commit ec89d0b

Please sign in to comment.