blockchainethereumblockchain-walleterc20erc721walletxdaidappdecentralizederc1155erc875iosswifttokens
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.5 KiB
51 lines
1.5 KiB
//
|
|
// Created by James Sangalli on 8/3/18.
|
|
//
|
|
|
|
import Foundation
|
|
import XCTest
|
|
@testable import AlphaWallet
|
|
import BigInt
|
|
|
|
class ClaimOrderCoordinatorTests: XCTestCase {
|
|
|
|
var expectations = [XCTestExpectation]()
|
|
|
|
func testClaimOrder() {
|
|
//TODO doesn't actually test anything
|
|
// let claimOrderCoordinator = FakeClaimOrderCoordinator()
|
|
let expectation = self.expectation(description: "wait til callback")
|
|
expectations.append(expectation)
|
|
var indices = [UInt16]()
|
|
indices.append(14)
|
|
let expiry = BigUInt("0")!
|
|
|
|
let token = TokenObject(
|
|
contract: AlphaWallet.Address(string: "0xacDe9017473D7dC82ACFd0da601E4de291a7d6b0")!,
|
|
server: .main,
|
|
name: "MJ Comeback",
|
|
symbol: "MJC",
|
|
decimals: 0,
|
|
value: "0",
|
|
isCustom: true,
|
|
isDisabled: false,
|
|
type: .erc875
|
|
)
|
|
|
|
let order = Order(price: BigUInt(0),
|
|
indices: indices,
|
|
expiry: expiry,
|
|
contractAddress: token.contractAddress,
|
|
count: 1,
|
|
nonce: BigUInt(0),
|
|
tokenIds: [BigUInt](),
|
|
spawnable: false,
|
|
nativeCurrencyDrop: false
|
|
)
|
|
|
|
let _ = SignedOrder(order: order, message: [UInt8](), signature: "")
|
|
expectation.fulfill()
|
|
wait(for: expectations, timeout: 10)
|
|
}
|
|
|
|
}
|
|
|