Merge with master

pull/21/head
Emre KARTAL 1 year ago
commit 623535e2b4

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "GiftEarn.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Gift.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

@ -0,0 +1,32 @@
//
// ChoiceFinalAnswerCell.swift
// AllIn
//
// Created by Lucas Delanier on 29/01/2024.
//
import Foundation
import SwiftUI
import Model
struct ChoiceFinalAnswerCell: View {
var selected = false
var answer: AnswerDetail
var rawColor = AllInColors.blueAccentColor
var body: some View {
ZStack{
HStack{
Spacer()
Text(answer.response)
.textStyle(weight: .bold, color: selected ? AllInColors.whiteColor :rawColor, size: 40).padding(.vertical, 10)
Spacer()
}
HStack{
Spacer()
OddCapsule(backgroundColor: selected ? AllInColors.whiteColor : AllInColors.purpleAccentColor, foregroundColor: selected ? AllInColors.purpleAccentColor : AllInColors.whiteColor ,odd: answer.odds ).padding(.trailing,20).scaleEffect(0.9)
}
}.background(selected ? AllInColors.purpleAccentColor : AllInColors.whiteColor).cornerRadius(17)
}
}

@ -0,0 +1,33 @@
//
// OddCapsule.swift
// AllIn
//
// Created by Lucas Delanier on 03/02/2024.
//
import Foundation
import SwiftUI
struct OddCapsule: View {
var backgroundColor: Color = AllInColors.purpleAccentColor
var foregroundColor: Color = AllInColors.whiteColor
var odd: Float = 0.0
var body: some View {
HStack(alignment: .center) {
Text("x\(odd.description)")
.fontWeight(.bold)
.foregroundColor(foregroundColor)
}
.padding(.horizontal, 10)
.padding(.vertical,5)
.background(backgroundColor)
.cornerRadius(9999)
}
}
struct OddCapsule_Previews: PreviewProvider {
static var previews: some View {
OddCapsule()
}
}

@ -6,28 +6,32 @@
//
import SwiftUI
import Model
struct ReviewCard: View {
@State var showDetails: Bool = false
@State var showPartipated: Bool = false
@State var betDetail: BetDetail
var amountBetted: Int
var isAWin: Bool
var body: some View {
VStack(spacing: 0){
VStack(alignment: .leading,spacing: 2){
HStack{
Spacer()
Text("proposé par Lucas")
.font(.system(size: 10))
.foregroundColor(AllInColors.grey800Color)
Text("proposé par \(betDetail.bet.author.username)")
.font(.system(size: 10))
.foregroundColor(AllInColors.grey800Color)
}
Text("Etudes").font(.system(size: 15)).foregroundColor(AllInColors.grey800Color)
Text("Emre va réussir son TP de CI/CD mercredi?").font(.system(size: 20)).fontWeight(.bold)
Text(betDetail.bet.theme).font(.system(size: 15)).foregroundColor(AllInColors.grey800Color)
Text(betDetail.bet.phrase).font(.system(size: 20)).fontWeight(.bold)
HStack{
Text("Fini le").font(.system(size: 15)).foregroundColor(AllInColors.grey800Color)
TextCapsule(date: Date())
TextCapsule(date: betDetail.bet.endBetDate)
Spacer()
}
@ -40,17 +44,24 @@ struct ReviewCard: View {
VStack(alignment: .center,spacing:0){
HStack(){
Spacer()
Text(amountBetted.description)
.foregroundColor(.white)
.font(.system(size: 25))
.fontWeight(.bold)
Image("allcoinWhiteIcon")
.resizable()
.frame(width: 20, height: 20, alignment: .bottom)
Text(isAWin ? "Gagnés!" : "Perdus!")
.foregroundColor(.white)
.font(.system(size: 25))
.fontWeight(.bold)
if(betDetail.bet.isFinish()){
Text("Terminé")
.foregroundColor(.white)
.font(.system(size: 25))
.fontWeight(.bold)
}
else{Text(amountBetted.description)
.foregroundColor(.white)
.font(.system(size: 25))
.fontWeight(.bold)
Image("allcoinWhiteIcon")
.resizable()
.frame(width: 20, height: 20, alignment: .bottom)
Text(isAWin ? "Gagnés!" : "Perdus!")
.foregroundColor(.white)
.font(.system(size: 25))
.fontWeight(.bold)
}
Spacer()
}
@ -61,7 +72,7 @@ struct ReviewCard: View {
.frame(width: .infinity)
.padding(.all,2)
.background(
isAWin ?
isAWin || betDetail.bet.isFinish() ?
AnyView(AllInColors.primaryGradient) :
AnyView(Color.black)
) .cornerRadius(20, corners: [.bottomLeft,.bottomRight])

@ -78,7 +78,7 @@ struct InfiniteScroller<Content: View>: View {
content()
content()
}
.offset(x: xOffset, y: 0)
.offset(x: xOffset, y: 0).opacity(0.3)
}
.disabled(true)
.onAppear {
@ -89,9 +89,9 @@ struct InfiniteScroller<Content: View>: View {
xOffset = +contentWidth
}
}
.frame(width: 1000, height: 1000)
.frame(width: 1300, height: 1300)
.padding(.leading, -400)
.rotationEffect(.degrees(30))
.opacity(0.04)
.opacity(0.1)
}
}

@ -10,6 +10,7 @@ import DependencyInjection
struct ContentView: View {
@State private var show = false
@Inject var authService: IAuthService
@ObservedObject var loggedState = AppStateContainer.shared.loggedState
@ -29,7 +30,20 @@ struct ContentView: View {
}
.onAppear {
authService.refreshAuthentication()
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
withAnimation {
show = true
}
}
}
.overlay(
Group {
if show {
DailyGiftPage(show: $show)
.transition(.opacity)
}
}
)
}
}

@ -7,43 +7,82 @@
import Foundation
import SwiftUI
import Model
import StubLib
struct BetEndingValidation: View {
@Environment(\.dismiss) var dismiss
@State var xOffset: CGFloat = 0
@State var selectedAnswer : String?
var bet: BetDetail = BetStubManager().getABetDetail()
var body: some View {
ZStack{
GeometryReader { geometry in
InfiniteScroller(contentWidth: geometry.size.width) {
Image("marquee").resizable().scaledToFit()
Image("marquee")
.resizable()
.scaledToFit()
}
VStack {
ZStack(alignment: .topLeading){
HStack{
Spacer()
Image("allinIcon").resizable().frame(width: 35, height: 35)
Image("allinIcon")
.resizable()
.frame(width: 35, height: 35)
Spacer()
}
Image("crossIcon").resizable().frame(width: 25, height: 25).onTapGesture {
dismiss()
}
Image("crossIcon")
.resizable()
.frame(width: 25, height: 25)
.onTapGesture {
dismiss()
}
}
HStack{
Text("FÉLICITATIONS").font(.system(size: 20)).foregroundColor(.white).fontWeight(.semibold).italic()
Text("PSEUDO!").padding(.top,9).font(.system(size: 33)).fontWeight(.heavy).foregroundColor(.white)
ReviewCard(betDetail: bet, amountBetted: 0, isAWin: false)
.padding(.top, 20)
.padding(.bottom, 10)
Text("Ce bet est arrivé à la date de fin. Vous devez à présent distribuer les gains en validant le pari gagnant.")
.textStyle(weight: .regular, color: AllInColors.grey800Color, size: 13)
.multilineTextAlignment(.center)
Text("Veuillez choisir la réponse finale:")
.font(.system(size: 17))
.foregroundStyle(AllInColors.whiteColor)
.fontWeight(.bold)
.padding(.top, 30)
.padding(.bottom, 10)
.frame(maxWidth: .infinity, alignment: .leading)
VStack(spacing: 14){
ForEach(bet.answers, id: \.self) { answer in
ChoiceFinalAnswerCell(selected : answer.response == selectedAnswer, answer: answer).onTapGesture {
if(selectedAnswer == answer.response){
selectedAnswer = nil
}
else {
selectedAnswer = answer.response
}
}
}
}
.rotationEffect(.degrees(-4))
.padding(.top,40)
Spacer()
AllcoinsCapsule()
Spacer()
RecapBetCard()
Spacer()
selectedAnswer != nil ? Button {
dismiss()
} label: {
Text("Valider")
.font(.system(size: 23))
.foregroundColor(AllInColors.whiteColor)
.fontWeight(.bold)
.frame(maxWidth: .infinity)
.padding(.vertical, 3)
}
.buttonStyle(.borderedProminent)
.tint(AllInColors.purpleAccentColor)
: nil
}
.padding([.all],20)
}
@ -52,3 +91,5 @@ struct BetEndingValidation: View {
}
}

@ -58,7 +58,7 @@ struct BetView: View {
viewModel.getItems()
}
.sheet(isPresented: $showingSheet) {
WinModal()
BetEndingValidation()
}
Spacer()
}

@ -7,12 +7,14 @@
import SwiftUI
import Model
import StubLib
struct CurrentBetView: View {
@StateObject private var viewModel = CurrentBetViewModel()
@Binding var showMenu: Bool
@State private var showingSheet = false
var betD: BetDetail = BetStubManager().getABetDetail()
var body: some View {
@ -25,7 +27,7 @@ struct CurrentBetView: View {
.padding([.top],15)
VStack(spacing: 20){
ForEach(viewModel.bets, id: \.id) { (bet: Bet) in
ReviewCard(amountBetted: 110, isAWin: false)
ReviewCard(betDetail: betD, amountBetted: 110, isAWin: false)
}
}
.padding([.trailing, .leading, .bottom],25)

@ -0,0 +1,120 @@
//
// DailyGiftPage.swift
// AllIn
//
// Created by Emre on 02/02/2024.
//
import SwiftUI
struct DailyGiftPage: View {
enum Step {
case first
case end
}
@State private var step: Step = .first
@State private var scale: CGFloat = 1.0
@State private var scale2: CGFloat = 0
@State private var rotate: CGFloat = 1
@Binding var show: Bool
var body: some View {
GeometryReader { geometry in
LinearGradient(
gradient: Gradient(colors: [
Color.black.opacity(0.6),
Color.black.opacity(0.9)
]),
startPoint: .top,
endPoint: .bottom
)
.edgesIgnoringSafeArea(.all)
VStack {
Text("Récompense quotidienne")
.textStyle(weight: .bold, color: .white, size: 25)
Group {
switch step {
case .first:
Image("giftImage")
.transition(
.asymmetric(
insertion: .scale(scale: 0.9).combined(with: .opacity),
removal: .scale(scale: 1.7).combined(with: .opacity))
)
.scaleEffect(scale)
.rotationEffect(.degrees(Double(scale) * 10), anchor: .center)
.rotationEffect(.degrees(-10), anchor: .center)
.onAppear {
withAnimation(Animation.easeInOut(duration: 1).repeatForever()) {
scale = 1.1
}
}
case .end:
ZStack {
Image("giftEarnImage")
.rotationEffect(.degrees(Double(rotate) * 10), anchor: .center)
.rotationEffect(.degrees(-10), anchor: .center)
.onAppear {
withAnimation(Animation.easeInOut(duration: 1).repeatForever()) {
rotate = 1.3
}
}
HStack {
Text("+ 123")
.textStyle(weight: .black, color: .white, size: 55)
Image("allcoinWhiteIcon")
.resizable()
.frame(width: 40, height: 40)
}
}
.scaleEffect(scale2)
.onAppear {
withAnimation(Animation.easeInOut(duration: 0.8)) {
scale2 = 1.0
}
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
withAnimation {
show = false
step = .first
}
}
}
.onDisappear {
scale2 = 0
}
}
}
.frame(width: geometry.size.width * 0.8, height: geometry.size.height * 0.4)
.onTapGesture {
withAnimation {
switch step {
case .first:
step = .end
case .end:
show = false
step = .first
}
}
}
Text("Votre récompense quotidienne est débloquée tous les jours à 00:00 UTC et vous permet dobtenir entre 10 et 150 Allcoins.")
.textStyle(weight: .medium, color: .white, size: 13)
.multilineTextAlignment(.center)
.padding(.horizontal, geometry.size.width * 0.13)
.opacity(0.67)
}
.frame(width: geometry.size.width, height: geometry.size.height)
}
}
}
struct DailyGiftPage_Previews: PreviewProvider {
static var previews: some View {
DailyGiftPage(show: .constant(false))
}
}

@ -22,8 +22,8 @@ struct HistoricBetView: View {
.textStyle(weight: .bold, color: AllInColors.grey500Color, size: 25)
.padding([.top],15)
VStack(spacing: 20){
ReviewCard(amountBetted: 110, isAWin: true)
ReviewCard(amountBetted: 3, isAWin: false)
// ReviewCard(amountBetted: 110, isAWin: true)
// ReviewCard(amountBetted: 3, isAWin: false)
}
.padding([.trailing, .leading, .bottom],25)
}

@ -139,7 +139,6 @@ struct LoginView: View {
focusedField = nil
}
}
}
}

@ -10,11 +10,13 @@
120919182B56D0AE00D0FA29 /* ParticipationModal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120919172B56D0AE00D0FA29 /* ParticipationModal.swift */; };
1209191A2B56DC6C00D0FA29 /* DropDownAnswerMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120919192B56DC6C00D0FA29 /* DropDownAnswerMenu.swift */; };
123225D92B67B46100D30BB3 /* BetEndingValidationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123225D82B67B46100D30BB3 /* BetEndingValidationView.swift */; };
123225DB2B67E41400D30BB3 /* ChoiceFinalAnswerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123225DA2B67E41400D30BB3 /* ChoiceFinalAnswerCell.swift */; };
123590B42B51792000F7AEBD /* DetailsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123590B32B51792000F7AEBD /* DetailsView.swift */; };
123590B62B5537E200F7AEBD /* ResultBanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123590B52B5537E200F7AEBD /* ResultBanner.swift */; };
123590B82B5541BA00F7AEBD /* ParticipateButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123590B72B5541BA00F7AEBD /* ParticipateButton.swift */; };
1244EF602B4EC31E00374ABF /* HistoricBetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1244EF5F2B4EC31E00374ABF /* HistoricBetView.swift */; };
1244EF622B4EC67000374ABF /* ReviewCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1244EF612B4EC67000374ABF /* ReviewCard.swift */; };
129D051D2B6E7FF0003D3E08 /* OddCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 129D051C2B6E7FF0003D3E08 /* OddCapsule.swift */; };
12C370482B5A5EE500CD9F0F /* BetLineLoading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12C370472B5A5EE500CD9F0F /* BetLineLoading.swift */; };
12C3704A2B5D5BD000CD9F0F /* ParticiationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12C370492B5D5BD000CD9F0F /* ParticiationCell.swift */; };
EC0193782B25BF16005D81E6 /* AllcoinsCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC0193772B25BF16005D81E6 /* AllcoinsCapsule.swift */; };
@ -73,6 +75,7 @@
ECB7BC6C2B2F43EE002A6654 /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB7BC6B2B2F43EE002A6654 /* AppState.swift */; };
ECB7BC702B336E28002A6654 /* RegisterViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB7BC6F2B336E28002A6654 /* RegisterViewModel.swift */; };
ECCD244A2B4DE8010071FA9E /* Api in Frameworks */ = {isa = PBXBuildFile; productRef = ECCD24492B4DE8010071FA9E /* Api */; };
ECED90B52B6D9CEC00F50937 /* DailyGiftPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECED90B42B6D9CEC00F50937 /* DailyGiftPage.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -112,11 +115,13 @@
122278B72B4BDE1100E632AA /* DependencyInjection.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DependencyInjection.framework; sourceTree = BUILT_PRODUCTS_DIR; };
122278B92B4BDE9500E632AA /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Package.swift; path = ../Model/Package.swift; sourceTree = "<group>"; };
123225D82B67B46100D30BB3 /* BetEndingValidationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BetEndingValidationView.swift; sourceTree = "<group>"; };
123225DA2B67E41400D30BB3 /* ChoiceFinalAnswerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChoiceFinalAnswerCell.swift; sourceTree = "<group>"; };
123590B32B51792000F7AEBD /* DetailsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailsView.swift; sourceTree = "<group>"; };
123590B52B5537E200F7AEBD /* ResultBanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResultBanner.swift; sourceTree = "<group>"; };
123590B72B5541BA00F7AEBD /* ParticipateButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticipateButton.swift; sourceTree = "<group>"; };
1244EF5F2B4EC31E00374ABF /* HistoricBetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoricBetView.swift; sourceTree = "<group>"; };
1244EF612B4EC67000374ABF /* ReviewCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReviewCard.swift; sourceTree = "<group>"; };
129D051C2B6E7FF0003D3E08 /* OddCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OddCapsule.swift; sourceTree = "<group>"; };
12C370472B5A5EE500CD9F0F /* BetLineLoading.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BetLineLoading.swift; sourceTree = "<group>"; };
12C370492B5D5BD000CD9F0F /* ParticiationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticiationCell.swift; sourceTree = "<group>"; };
EC0193772B25BF16005D81E6 /* AllcoinsCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllcoinsCapsule.swift; sourceTree = "<group>"; };
@ -176,6 +181,7 @@
ECB7BC692B2F410A002A6654 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
ECB7BC6B2B2F43EE002A6654 /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = "<group>"; };
ECB7BC6F2B336E28002A6654 /* RegisterViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterViewModel.swift; sourceTree = "<group>"; };
ECED90B42B6D9CEC00F50937 /* DailyGiftPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DailyGiftPage.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -314,6 +320,7 @@
123590B32B51792000F7AEBD /* DetailsView.swift */,
123225D82B67B46100D30BB3 /* BetEndingValidationView.swift */,
EC17A15D2B6A955E008A8679 /* CurrentBetView.swift */,
ECED90B42B6D9CEC00F50937 /* DailyGiftPage.swift */,
);
path = Views;
sourceTree = "<group>";
@ -346,6 +353,8 @@
120919192B56DC6C00D0FA29 /* DropDownAnswerMenu.swift */,
12C370472B5A5EE500CD9F0F /* BetLineLoading.swift */,
12C370492B5D5BD000CD9F0F /* ParticiationCell.swift */,
123225DA2B67E41400D30BB3 /* ChoiceFinalAnswerCell.swift */,
129D051C2B6E7FF0003D3E08 /* OddCapsule.swift */,
);
path = Components;
sourceTree = "<group>";
@ -542,12 +551,15 @@
EC650A4C2B25E9C7003AFCAD /* RankingView.swift in Sources */,
EC7A882B2B28D1E0004F226A /* DropDownMenu.swift in Sources */,
EC7A882D2B28D8A1004F226A /* CreationBetView.swift in Sources */,
ECED90B52B6D9CEC00F50937 /* DailyGiftPage.swift in Sources */,
EC6B96CF2B24B8D900FC1C58 /* Config.swift in Sources */,
1244EF602B4EC31E00374ABF /* HistoricBetView.swift in Sources */,
EC30770B2B24D9160060E34D /* WelcomeView.swift in Sources */,
EC30770D2B24DB7A0060E34D /* Extensions.swift in Sources */,
EC6B96D82B24BF2100FC1C58 /* Menu.swift in Sources */,
EC650A4E2B278EDB003AFCAD /* TrendingBetCard.swift in Sources */,
123225DB2B67E41400D30BB3 /* ChoiceFinalAnswerCell.swift in Sources */,
129D051D2B6E7FF0003D3E08 /* OddCapsule.swift in Sources */,
123225D92B67B46100D30BB3 /* BetEndingValidationView.swift in Sources */,
EC0193782B25BF16005D81E6 /* AllcoinsCapsule.swift in Sources */,
EC650A4A2B25DD58003AFCAD /* FriendsView.swift in Sources */,

@ -8,7 +8,7 @@
import Foundation
/// A class representing detailed information about a specific answer option for a bet.
public class AnswerDetail: ObservableObject {
public class AnswerDetail: ObservableObject, Hashable {
/// The response or outcome associated with this answer.
public private(set) var response: String
@ -40,4 +40,17 @@ public class AnswerDetail: ObservableObject {
self.highestStake = highestStake
self.odds = odds
}
public func hash(into hasher: inout Hasher) {
// Use properties that define the uniqueness of the instance for hashing
hasher.combine(response)
// ... (combine other properties)
}
public static func == (lhs: AnswerDetail, rhs: AnswerDetail) -> Bool {
// Check equality based on properties
return lhs.response == rhs.response
// ... (check other properties)
}
}

@ -98,4 +98,8 @@ public class Bet: ObservableObject, Identifiable {
public func addRegistered(newUser: User){
self.registered.append(newUser)
}
public func isFinish() -> Bool{
self.endBetDate < Date()
}
}

@ -29,4 +29,8 @@ public struct BetStubManager: BetDataManager {
}
}
public func getABetDetail() -> BetDetail{
Stub.shared.betsDetail.first!
}
}

@ -85,7 +85,7 @@ struct Stub {
self.bets.append(bet4)
for bet in bets {
let betDetail = BetDetail(bet: bet, answers: [], participations: [])
let betDetail = BetDetail(bet: bet, answers: [AnswerDetail(response: "OUI", totalStakes: 120, totalParticipants: 2, highestStake: 200, odds: 1.2), AnswerDetail(response: "NON", totalStakes: 120, totalParticipants: 2, highestStake: 200, odds: 1.2)], participations: [])
self.betsDetail.append(betDetail)
}

Loading…
Cancel
Save