I hereby claim:
- I am quangkeu95 on github.
- I am quangkeu95 (https://keybase.io/quangkeu95) on keybase.
- I have a public key ASDvi3_r0U_iymEyWLKFQhbn_GSMUfamBmvdlYPcSXpTlQo
To claim this, I am signing this object:
// Fetch lock info from rpc | |
pub async fn fetch_lock_info_from_rpc(rpc_client: &RpcClient, pair_id: &str) -> Result<LockInfo> { | |
let pool_pubkey = Pubkey::from_str(pair_id)?; | |
// find lp mint of the pool | |
let pool_account = rpc_client.get_account(&pool_pubkey).await?; | |
let pool = PoolState::try_deserialize(&mut pool_account.data.as_ref())?; | |
let lp_mint = pool.lp_mint; | |
let lp_mint_account = rpc_client.get_account(&lp_mint).await?; | |
let lp_mint_state = Mint::try_deserialize(&mut lp_mint_account.data.as_ref())?; |
I hereby claim:
To claim this, I am signing this object:
For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following: | |
First method (override Material UI classnames): | |
1 - Add the property classes in the AppBar component: | |
<AppBar classes={{root: 'my-root-class'}} | |
2 - Override the styles with the styled components: | |
styled(AppBar)` | |
&.my-root-class { | |
z-index: 1500; | |
} |
class Animal { | |
constructor(name, weight) { | |
this.name = name; | |
this.weight = weight; | |
} | |
eat() { | |
return `${this.name} is eating`; | |
} | |
function Person(name, age) { | |
this.name = name; | |
this.age = age; | |
}; | |
Person.prototype.sayHi = function() { | |
console.log(`${this.name}, ${this.age} say hi`); | |
}; | |
function Employee(name, age, job) { |
let person = { | |
works: true | |
}; | |
function Employee(name) { | |
this.name = name; | |
} | |
Employee.prototype = person; |
function User(name, birthday) { | |
this.name = name; | |
this.birthday = birthday; | |
// age is calculated from the current date and birthday | |
Object.defineProperty(this, "age", { | |
get() { | |
let todayYear = new Date().getFullYear(); | |
return todayYear - this.birthday.getFullYear(); | |
} |
let employee = { | |
get workDuration() { | |
return this._workDuration; | |
}, | |
set workDuration(value) { | |
if (value.length > 8) { | |
console.log("Work duration is too much, maximum 8 hours is allowed"); | |
return; | |
} | |
this._workDuration = value; |